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 brian519 <bp...@desire2learn.com> on 2011/11/10 19:00:04 UTC

Re: Reverse range query

This post helped me solve my problem which I had posted on StackOverflow. 
See my answer here: 
http://stackoverflow.com/questions/8070742/solr-multivalued-field-how-can-i-return-documents-where-all-values-in-the-fiel
http://stackoverflow.com/questions/8070742/solr-multivalued-field-how-can-i-return-documents-where-all-values-in-the-fiel 

Would be great to see a feature in Solr for a "reverse query".  Ie, the
value in your solr document is queried against your "query input", which
would make problems like this a breeze.

--
View this message in context: http://lucene.472066.n3.nabble.com/Reverse-range-query-tp1789135p3497482.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Reverse range query

Posted by Erick Erickson <er...@gmail.com>.
Well, what does adding &debug=query show you for the parsed query? What
documents show up?

My first guess is that since you're using exclusive rather than inclusive
end points you're expectations aren't what you think.

Best
Erick


On Mon, Feb 11, 2013 at 10:57 PM, ballusethuraman <ballusethuraman@gmail.com
> wrote:

> Hi,
> I have craeted new attribute(Year) in attribute dictionary and associated
> with different catentries with different values say
> 2000,2001,2002,2003,...2012.
> Now I want to search with the Year attribute with min and max range. when
> 2000 to 2005 is given as search condition it should fetch the catentries
> which is between these two values.
> This is the url I used to hit the solr server.
> ads_f11001 is the logical name of the attribute "year" that i have created
> in management center. This value will be in "srchattrprop" table. 2000 and
> 2005 is min and max range.
> http://localhost/solr/MC_10701_CatalogEntry_en_US/select?q=ads_f11001:{2000
> 2005}
>
> when i try to hit this url i am getting 0 records found.
> http://localhost/solr/MC_10701_CatalogEntry_en_US/select?q=ads_f11001:{2000
> TO *}
>
> and
>
> http://localhost/solr/MC_10701_CatalogEntry_en_US/select?q=ads_f11001:{*TO
> 2005}
>
> These above two urls ferching me some result but it s not the expected
> result. Plz help me to solve this issue.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Reverse-range-query-tp1789135p4039860.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Reverse range query

Posted by ballusethuraman <ba...@gmail.com>.
Hi,
I have craeted new attribute(Year) in attribute dictionary and associated
with different catentries with different values say
2000,2001,2002,2003,...2012.
Now I want to search with the Year attribute with min and max range. when
2000 to 2005 is given as search condition it should fetch the catentries
which is between these two values. 
This is the url I used to hit the solr server.
ads_f11001 is the logical name of the attribute "year" that i have created
in management center. This value will be in "srchattrprop" table. 2000 and
2005 is min and max range.
http://localhost/solr/MC_10701_CatalogEntry_en_US/select?q=ads_f11001:{2000
2005}

when i try to hit this url i am getting 0 records found.
http://localhost/solr/MC_10701_CatalogEntry_en_US/select?q=ads_f11001:{2000
TO *}

and

http://localhost/solr/MC_10701_CatalogEntry_en_US/select?q=ads_f11001:{* TO
2005}

These above two urls ferching me some result but it s not the expected
result. Plz help me to solve this issue.



--
View this message in context: http://lucene.472066.n3.nabble.com/Reverse-range-query-tp1789135p4039860.html
Sent from the Solr - User mailing list archive at Nabble.com.