You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Asfand Qazi <aq...@sanger.ac.uk> on 2012/10/16 15:37:51 UTC

Having trouble getting boosting queries to work with multiple terms

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' field matches what I want it to.  This 
returns several documents, each one having a 'type' field.  The value 
can be either 'allele', 'mi_attempt' or 'phenotype_attempt'.

What I want to do is return all documents where the 'mgi_accession_id' 
matches what I want, and I want the documents ordered such that 
'type:allele' docs are at the top, followed by 'type:mi_attempt' docs, 
followed last by 'type:phenotype_attempt' docs.

Here is an example of a query I fire at it:

http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id:"MGI:1315204"&bq=type:allele^100 
type:mi_attempt^10 type:phenotype_attempt^1

All the docs end up with the same score!

I'm clearly doing something wrong, but what?  Help is appreciated.

Thanks in advance.

-- 
Regards,
       Asfand Yar Qazi
       Team 87 - High Throughput Gene Targeting
       Wellcome Trust Sanger Institute



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

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

Posted by Jack Krupansky <ja...@basetechnology.com>.
Sometimes things like term frequency can overwhelm even a seemingly large 
boost. Add &debugQuery=true to your query request and check the "explain" 
section for how the "allelle" document is scored and contrast that with the 
scoring for the "mi_attempt" document. 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 multiple 
terms

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_attempt .  It should be allele first, then mi_attempt, then
phenotype_attempt.  You can replicate it with the above URL, it is a
publicly available index.

Thanks

On 16/10/12 15:37, Tomás Fernández Löbbe wrote:
> 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 <aq...@sanger.ac.uk> wrote:
>
>> Hello,
>>
>> The Solr server I am driving is found publicly at
>> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search<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' field matches what I want it to.  This 
>> returns
>> several documents, each one having a 'type' field.  The value can be 
>> either
>> 'allele', 'mi_attempt' or 'phenotype_attempt'.
>>
>> What I want to do is return all documents where the 'mgi_accession_id'
>> matches what I want, and I want the documents ordered such that
>> 'type:allele' docs are at the top, followed by 'type:mi_attempt' docs,
>> followed last by 'type:phenotype_attempt' docs.
>>
>> Here is an example of a query I fire at it:
>>
>> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search?q=mgi_**
>> accession_id<http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id>
>> :"MGI:1315204"&bq=**type:allele^100 type:mi_attempt^10
>> type:phenotype_attempt^1
>>
>> All the docs end up with the same score!
>>
>> I'm clearly doing something wrong, but what?  Help is appreciated.
>>
>> Thanks in advance.
>>
>> --
>> Regards,
>>        Asfand Yar Qazi
>>        Team 87 - High Throughput Gene Targeting
>>        Wellcome Trust Sanger Institute
>>
>>
>>
>> --
>> The Wellcome Trust Sanger Institute is operated by Genome Research
>> Limited, a charity registered in England with number 1021457 and a 
>> company
>> registered in England with number 2742969, whose registered office is 215
>> Euston Road, London, NW1 2BE.
>


-- 
Regards,
       Asfand Yar Qazi
       Team 87 - High Throughput Gene Targeting
       Wellcome Trust Sanger Institute



-- 
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE. 


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

Posted by Asfand Qazi <aq...@sanger.ac.uk>.
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=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, the regular score will be
> used for sorting.
>
> Tomás
>
> On Tue, Oct 16, 2012 at 1:18 PM, Walter Underwood <wu...@wunderwood.org>wrote:
>
>> 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, you may be able do the same thing with if
>> statements in the function query, see
>> http://wiki.apache.org/solr/FunctionQuery
>>
>> This is a common design request, to show all results of type A before all
>> results of type B, and it has a common and severe problem. If your query
>> term is common, the user will see 10,000 hits of type A, all the way to the
>> least relevant, before they see the highly-relevant first hit of type B.
>> So, the search is broken for all common query terms and there is nothing
>> the user can do to fix it.
>>
>> Instead, use a smaller boost, maybe a bit more than a tiebreaker, but not
>> enough to force a total ordering. You may also want to use facets or fixed
>> filters, so that users can select only alleles or only my_attempts.
>>
>> wunder
>>
>> On Oct 16, 2012, at 8:21 AM, Asfand Qazi wrote:
>>
>>> 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 strict ordering, I recommend doing three queries and
>> concatenating the three result sets.
>>>>
>>>> wunder
>>>
>>> I want that ordering because alleles are more 'important' to a biologist
>> than an mi_attempt, which is 'more important' than a phenotype_attempt.
>>>
>>> If Solr isn't designed for this kind of stuff, then I will do the
>> sorting manually after I have received all the documents.  I could give
>> huge boost values to each term, but then I guess I'm just using a
>> sledgehammer to crack a nut.
>>>
>>> Thanks
>>>
>>> --
>>> Regards,
>>>       Asfand Yar Qazi
>>>       Team 87 - High Throughput Gene Targeting
>>>       Wellcome Trust Sanger Institute
>>>
>>>
>>>
>>> --
>>> The Wellcome Trust Sanger Institute is operated by Genome Research
>> Limited, a charity registered in England with number 1021457 and a company
>> registered in England with number 2742969, whose registered office is 215
>> Euston Road, London, NW1 2BE.
>>
>> --
>> Walter Underwood
>> wunder@wunderwood.org
>>
>>
>>
>>
>


-- 
Regards,
       Asfand Yar Qazi
       Team 87 - High Throughput Gene Targeting
       Wellcome Trust Sanger Institute



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

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

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
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, the regular score will be
used for sorting.

Tomás

On Tue, Oct 16, 2012 at 1:18 PM, Walter Underwood <wu...@wunderwood.org>wrote:

> 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, you may be able do the same thing with if
> statements in the function query, see
> http://wiki.apache.org/solr/FunctionQuery
>
> This is a common design request, to show all results of type A before all
> results of type B, and it has a common and severe problem. If your query
> term is common, the user will see 10,000 hits of type A, all the way to the
> least relevant, before they see the highly-relevant first hit of type B.
> So, the search is broken for all common query terms and there is nothing
> the user can do to fix it.
>
> Instead, use a smaller boost, maybe a bit more than a tiebreaker, but not
> enough to force a total ordering. You may also want to use facets or fixed
> filters, so that users can select only alleles or only my_attempts.
>
> wunder
>
> On Oct 16, 2012, at 8:21 AM, Asfand Qazi wrote:
>
> > 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 strict ordering, I recommend doing three queries and
> concatenating the three result sets.
> >>
> >> wunder
> >
> > I want that ordering because alleles are more 'important' to a biologist
> than an mi_attempt, which is 'more important' than a phenotype_attempt.
> >
> > If Solr isn't designed for this kind of stuff, then I will do the
> sorting manually after I have received all the documents.  I could give
> huge boost values to each term, but then I guess I'm just using a
> sledgehammer to crack a nut.
> >
> > Thanks
> >
> > --
> > Regards,
> >      Asfand Yar Qazi
> >      Team 87 - High Throughput Gene Targeting
> >      Wellcome Trust Sanger Institute
> >
> >
> >
> > --
> > The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a company
> registered in England with number 2742969, whose registered office is 215
> Euston Road, London, NW1 2BE.
>
> --
> Walter Underwood
> wunder@wunderwood.org
>
>
>
>

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

Posted by Walter Underwood <wu...@wunderwood.org>.
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, you may be able do the same thing with if statements in the function query, see http://wiki.apache.org/solr/FunctionQuery

This is a common design request, to show all results of type A before all results of type B, and it has a common and severe problem. If your query term is common, the user will see 10,000 hits of type A, all the way to the least relevant, before they see the highly-relevant first hit of type B. So, the search is broken for all common query terms and there is nothing the user can do to fix it.

Instead, use a smaller boost, maybe a bit more than a tiebreaker, but not enough to force a total ordering. You may also want to use facets or fixed filters, so that users can select only alleles or only my_attempts.

wunder

On Oct 16, 2012, at 8:21 AM, Asfand Qazi wrote:

> 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 strict ordering, I recommend doing three queries and concatenating the three result sets.
>> 
>> wunder
> 
> I want that ordering because alleles are more 'important' to a biologist than an mi_attempt, which is 'more important' than a phenotype_attempt.
> 
> If Solr isn't designed for this kind of stuff, then I will do the sorting manually after I have received all the documents.  I could give huge boost values to each term, but then I guess I'm just using a sledgehammer to crack a nut.
> 
> Thanks
> 
> -- 
> Regards,
>      Asfand Yar Qazi
>      Team 87 - High Throughput Gene Targeting
>      Wellcome Trust Sanger Institute
> 
> 
> 
> -- 
> The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. 

--
Walter Underwood
wunder@wunderwood.org




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

Posted by Asfand Qazi <aq...@sanger.ac.uk>.
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 strict ordering, I recommend doing three queries and concatenating the three result sets.
>
> wunder

I want that ordering because alleles are more 'important' to a biologist 
than an mi_attempt, which is 'more important' than a phenotype_attempt.

If Solr isn't designed for this kind of stuff, then I will do the 
sorting manually after I have received all the documents.  I could give 
huge boost values to each term, but then I guess I'm just using a 
sledgehammer to crack a nut.

Thanks

-- 
Regards,
       Asfand Yar Qazi
       Team 87 - High Throughput Gene Targeting
       Wellcome Trust Sanger Institute



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

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

Posted by Walter Underwood <wu...@wunderwood.org>.
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 and concatenating the three result sets.

wunder

On Oct 16, 2012, at 7:56 AM, Asfand Qazi wrote:

> 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_attempt .  It should be allele first, then mi_attempt, then phenotype_attempt.  You can replicate it with the above URL, it is a publicly available index.
> 
> Thanks
> 
> On 16/10/12 15:37, Tomás Fernández Löbbe wrote:
>> 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 <aq...@sanger.ac.uk> wrote:
>> 
>>> Hello,
>>> 
>>> The Solr server I am driving is found publicly at
>>> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search<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' field matches what I want it to.  This returns
>>> several documents, each one having a 'type' field.  The value can be either
>>> 'allele', 'mi_attempt' or 'phenotype_attempt'.
>>> 
>>> What I want to do is return all documents where the 'mgi_accession_id'
>>> matches what I want, and I want the documents ordered such that
>>> 'type:allele' docs are at the top, followed by 'type:mi_attempt' docs,
>>> followed last by 'type:phenotype_attempt' docs.
>>> 
>>> Here is an example of a query I fire at it:
>>> 
>>> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search?q=mgi_**
>>> accession_id<http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id>
>>> :"MGI:1315204"&bq=**type:allele^100 type:mi_attempt^10
>>> type:phenotype_attempt^1
>>> 
>>> All the docs end up with the same score!
>>> 
>>> I'm clearly doing something wrong, but what?  Help is appreciated.
>>> 
>>> Thanks in advance.
>>> 
>>> --
>>> Regards,
>>>       Asfand Yar Qazi
>>>       Team 87 - High Throughput Gene Targeting
>>>       Wellcome Trust Sanger Institute
>>> 
>>> 
>>> 
>>> --
>>> The Wellcome Trust Sanger Institute is operated by Genome Research
>>> Limited, a charity registered in England with number 1021457 and a company
>>> registered in England with number 2742969, whose registered office is 215
>>> Euston Road, London, NW1 2BE.
>> 
> 
> 
> -- 
> Regards,
>      Asfand Yar Qazi
>      Team 87 - High Throughput Gene Targeting
>      Wellcome Trust Sanger Institute
> 
> 
> 
> -- 
> The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. 

--
Walter Underwood
wunder@wunderwood.org




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

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
I meant: sort=type asc,score desc

On Tue, Oct 16, 2012 at 12:08 PM, Tomás Fernández Löbbe <
tomasflobbe@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 type 'allele'. See what I say adding
> debugQuery=true.
>
> If you'll always want this behavior, you may want to use sorting instead
> of boosting. You could use "sort=type desc,score asc".
>
> Tomás
>
>
> On Tue, Oct 16, 2012 at 11:56 AM, Asfand Qazi <aq...@sanger.ac.uk> wrote:
>
>> Hi, thanks for the reply.
>>
>> I tried that:
>>
>> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search?q=mgi_**
>> accession_id<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_attempt .  It should be allele first, then mi_attempt, then
>> phenotype_attempt.  You can replicate it with the above URL, it is a
>> publicly available index.
>>
>> Thanks
>>
>>
>> On 16/10/12 15:37, Tomás Fernández Löbbe wrote:
>>
>>> 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 <aq...@sanger.ac.uk> wrote:
>>>
>>>  Hello,
>>>>
>>>> The Solr server I am driving is found publicly at
>>>> http://ikmc.vm.bytemark.co.uk:****8983/solr/allele/search<http**
>>>> ://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search<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' field matches what I want it to.  This
>>>> returns
>>>> several documents, each one having a 'type' field.  The value can be
>>>> either
>>>> 'allele', 'mi_attempt' or 'phenotype_attempt'.
>>>>
>>>> What I want to do is return all documents where the 'mgi_accession_id'
>>>> matches what I want, and I want the documents ordered such that
>>>> 'type:allele' docs are at the top, followed by 'type:mi_attempt' docs,
>>>> followed last by 'type:phenotype_attempt' docs.
>>>>
>>>> Here is an example of a query I fire at it:
>>>>
>>>> http://ikmc.vm.bytemark.co.uk:****8983/solr/allele/search?q=**mgi_**
>>>> accession_id<http://ikmc.vm.**bytemark.co.uk:8983/solr/**
>>>> allele/search?q=mgi_accession_**id<http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id>
>>>> >
>>>> :"MGI:1315204"&bq=**type:**allele^100 type:mi_attempt^10
>>>>
>>>> type:phenotype_attempt^1
>>>>
>>>> All the docs end up with the same score!
>>>>
>>>> I'm clearly doing something wrong, but what?  Help is appreciated.
>>>>
>>>> Thanks in advance.
>>>>
>>>> --
>>>> Regards,
>>>>        Asfand Yar Qazi
>>>>        Team 87 - High Throughput Gene Targeting
>>>>        Wellcome Trust Sanger Institute
>>>>
>>>>
>>>>
>>>> --
>>>> The Wellcome Trust Sanger Institute is operated by Genome Research
>>>> Limited, a charity registered in England with number 1021457 and a
>>>> company
>>>> registered in England with number 2742969, whose registered office is
>>>> 215
>>>> Euston Road, London, NW1 2BE.
>>>>
>>>
>>>
>>
>> --
>> Regards,
>>       Asfand Yar Qazi
>>       Team 87 - High Throughput Gene Targeting
>>       Wellcome Trust Sanger Institute
>>
>>
>>
>> --
>> The Wellcome Trust Sanger Institute is operated by Genome Research
>> Limited, a charity registered in England with number 1021457 and a company
>> registered in England with number 2742969, whose registered office is 215
>> Euston Road, London, NW1 2BE.
>>
>
>

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

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
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 of
boosting. You could use "sort=type desc,score asc".

Tomás

On Tue, Oct 16, 2012 at 11:56 AM, Asfand Qazi <aq...@sanger.ac.uk> wrote:

> Hi, thanks for the reply.
>
> I tried that:
>
> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search?q=mgi_**
> accession_id<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_attempt .  It should be allele first, then mi_attempt, then
> phenotype_attempt.  You can replicate it with the above URL, it is a
> publicly available index.
>
> Thanks
>
>
> On 16/10/12 15:37, Tomás Fernández Löbbe wrote:
>
>> 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 <aq...@sanger.ac.uk> wrote:
>>
>>  Hello,
>>>
>>> The Solr server I am driving is found publicly at
>>> http://ikmc.vm.bytemark.co.uk:****8983/solr/allele/search<http**
>>> ://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search<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' field matches what I want it to.  This
>>> returns
>>> several documents, each one having a 'type' field.  The value can be
>>> either
>>> 'allele', 'mi_attempt' or 'phenotype_attempt'.
>>>
>>> What I want to do is return all documents where the 'mgi_accession_id'
>>> matches what I want, and I want the documents ordered such that
>>> 'type:allele' docs are at the top, followed by 'type:mi_attempt' docs,
>>> followed last by 'type:phenotype_attempt' docs.
>>>
>>> Here is an example of a query I fire at it:
>>>
>>> http://ikmc.vm.bytemark.co.uk:****8983/solr/allele/search?q=**mgi_**
>>> accession_id<http://ikmc.vm.**bytemark.co.uk:8983/solr/**
>>> allele/search?q=mgi_accession_**id<http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id>
>>> >
>>> :"MGI:1315204"&bq=**type:**allele^100 type:mi_attempt^10
>>>
>>> type:phenotype_attempt^1
>>>
>>> All the docs end up with the same score!
>>>
>>> I'm clearly doing something wrong, but what?  Help is appreciated.
>>>
>>> Thanks in advance.
>>>
>>> --
>>> Regards,
>>>        Asfand Yar Qazi
>>>        Team 87 - High Throughput Gene Targeting
>>>        Wellcome Trust Sanger Institute
>>>
>>>
>>>
>>> --
>>> The Wellcome Trust Sanger Institute is operated by Genome Research
>>> Limited, a charity registered in England with number 1021457 and a
>>> company
>>> registered in England with number 2742969, whose registered office is 215
>>> Euston Road, London, NW1 2BE.
>>>
>>
>>
>
> --
> Regards,
>       Asfand Yar Qazi
>       Team 87 - High Throughput Gene Targeting
>       Wellcome Trust Sanger Institute
>
>
>
> --
> The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a company
> registered in England with number 2742969, whose registered office is 215
> Euston Road, London, NW1 2BE.
>

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

Posted by Asfand Qazi <aq...@sanger.ac.uk>.
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_attempt .  It should be allele first, then mi_attempt, then 
phenotype_attempt.  You can replicate it with the above URL, it is a 
publicly available index.

Thanks

On 16/10/12 15:37, Tomás Fernández Löbbe wrote:
> 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 <aq...@sanger.ac.uk> wrote:
>
>> Hello,
>>
>> The Solr server I am driving is found publicly at
>> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search<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' field matches what I want it to.  This returns
>> several documents, each one having a 'type' field.  The value can be either
>> 'allele', 'mi_attempt' or 'phenotype_attempt'.
>>
>> What I want to do is return all documents where the 'mgi_accession_id'
>> matches what I want, and I want the documents ordered such that
>> 'type:allele' docs are at the top, followed by 'type:mi_attempt' docs,
>> followed last by 'type:phenotype_attempt' docs.
>>
>> Here is an example of a query I fire at it:
>>
>> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search?q=mgi_**
>> accession_id<http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id>
>> :"MGI:1315204"&bq=**type:allele^100 type:mi_attempt^10
>> type:phenotype_attempt^1
>>
>> All the docs end up with the same score!
>>
>> I'm clearly doing something wrong, but what?  Help is appreciated.
>>
>> Thanks in advance.
>>
>> --
>> Regards,
>>        Asfand Yar Qazi
>>        Team 87 - High Throughput Gene Targeting
>>        Wellcome Trust Sanger Institute
>>
>>
>>
>> --
>> The Wellcome Trust Sanger Institute is operated by Genome Research
>> Limited, a charity registered in England with number 1021457 and a company
>> registered in England with number 2742969, whose registered office is 215
>> Euston Road, London, NW1 2BE.
>


-- 
Regards,
       Asfand Yar Qazi
       Team 87 - High Throughput Gene Targeting
       Wellcome Trust Sanger Institute



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

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

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
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 <aq...@sanger.ac.uk> wrote:

> Hello,
>
> The Solr server I am driving is found publicly at
> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search<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' field matches what I want it to.  This returns
> several documents, each one having a 'type' field.  The value can be either
> 'allele', 'mi_attempt' or 'phenotype_attempt'.
>
> What I want to do is return all documents where the 'mgi_accession_id'
> matches what I want, and I want the documents ordered such that
> 'type:allele' docs are at the top, followed by 'type:mi_attempt' docs,
> followed last by 'type:phenotype_attempt' docs.
>
> Here is an example of a query I fire at it:
>
> http://ikmc.vm.bytemark.co.uk:**8983/solr/allele/search?q=mgi_**
> accession_id<http://ikmc.vm.bytemark.co.uk:8983/solr/allele/search?q=mgi_accession_id>
> :"MGI:1315204"&bq=**type:allele^100 type:mi_attempt^10
> type:phenotype_attempt^1
>
> All the docs end up with the same score!
>
> I'm clearly doing something wrong, but what?  Help is appreciated.
>
> Thanks in advance.
>
> --
> Regards,
>       Asfand Yar Qazi
>       Team 87 - High Throughput Gene Targeting
>       Wellcome Trust Sanger Institute
>
>
>
> --
> The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a company
> registered in England with number 2742969, whose registered office is 215
> Euston Road, London, NW1 2BE.