Re: Having trouble getting boosting queries to work with multiple terms

2012-10-17 Thread Asfand Qazi
Several ideas there, thanks guys. I'll re-evaluate how I build and use the index from now on. Asfand Qazi On 16/10/12 17:35, Tomás Fernández Löbbe wrote: I think sorting should work too, as I suggested before. In this case (because by coincidence you need alphabetic sort on the type) "sort=ty

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Tomás Fernández Löbbe
I think sorting should work too, as I suggested before. In this case (because by coincidence you need alphabetic sort on the type) "sort=type asc, score desc" should work. If you need to add other types, maybe add an int field that represents how you would like those to be sorted. between types, t

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Walter Underwood
Here is an approach that avoids the IDF problem. Add another field, perhaps named "priority". In that field, put a boost value, like 100 for allele docs, 10 for mi_attempt docs, and so on. In the boost part of the query, use the value of that field boost=priority. If you cannot change the index

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Asfand Qazi
On 16/10/12 16:15, Walter Underwood wrote: Why do you want that ordering? That isn't what Solr is designed to do. It is designed for relevance. I expect that idf (the rarity of the terms) is being used in the ordering. "mi_attempt" is probably much more rare than "allele". If you want that str

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Walter Underwood
Why do you want that ordering? That isn't what Solr is designed to do. It is designed for relevance. I expect that idf (the rarity of the terms) is being used in the ordering. "mi_attempt" is probably much more rare than "allele". If you want that strict ordering, I recommend doing three queries

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Tomás Fernández Löbbe
I meant: sort=type asc,score desc On Tue, Oct 16, 2012 at 12:08 PM, Tomás Fernández Löbbe < tomasflo...@gmail.com> wrote: > Yes, I saw that, but you'll need to add even more boosting than that, > other factors of the scoring are giving the doc with type mi_attempt higher > score than the one with

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Jack Krupansky
nt. Or documents - sometimes it is document frequency that excessively dominates the score. -- Jack Krupansky -Original Message- From: Asfand Qazi Sent: Tuesday, October 16, 2012 10:56 AM To: solr-user@lucene.apache.org Subject: Re: Having trouble getting boosting queries to work with mu

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Tomás Fernández Löbbe
Yes, I saw that, but you'll need to add even more boosting than that, other factors of the scoring are giving the doc with type mi_attempt higher score than the one with type 'allele'. See what I say adding debugQuery=true. If you'll always want this behavior, you may want to use sorting instead o

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Asfand Qazi
Hi, thanks for the reply. I tried that: http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id:"MGI:1315204"&bq=type:allele^100 OR type:mi_attempt^10 OR type:phenotype_attempt^1 (forgive the wrapping) and I got mi_attempt at the top, then the allele, then the phenotype_att

Re: Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Tomás Fernández Löbbe
you are missing the "OR" between the clauses of the bq. Try with: bq=type:allele^100 OR type:mi_attempt^10 OR type:phenotype_attempt^1 or set OR as your default operator in the schema.xml Tomás On Tue, Oct 16, 2012 at 10:37 AM, Asfand Qazi wrote: > Hello, > > The Solr server I am driving is f

Having trouble getting boosting queries to work with multiple terms

2012-10-16 Thread Asfand Qazi
Hello, The Solr server I am driving is found publicly at http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search , it contains freely available information from science research establishments. It contains many documents, and I usually do is look up all documents where the 'mgi_accession_id' f