Solr Query

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr Query

Vishal Patel
I am a bit new for Solr.

I am running below query in query browser admin interface

+RetailPriceCodeID:1 +MSRP:[16001.00 TO 32000.00]

I think it should return only results with RetailPriceCode = 1 ad MSRP
between 16001 and 32000.

But it returns all resuts with MSRP = 1 and doesnt consider 2nd query at
all.

Am i doing something wrong here? Please help
Reply | Threaded
Open this post in threaded view
|

Re: Solr Query

britske
> But it returns all resuts with MSRP = 1 and doesnt consider 2nd query at
all.

I believe you mean: 'it returns all results with RetailPriceCodeID = 1 while
ignoring the 2nd query?'

If so, please check that your default operator is set to AND in your schema
config.
Other than that, your syntax seems correct.

Hth,
Geert-Jan


2011/3/15 Vishal Patel <[hidden email]>

> I am a bit new for Solr.
>
> I am running below query in query browser admin interface
>
> +RetailPriceCodeID:1 +MSRP:[16001.00 TO 32000.00]
>
> I think it should return only results with RetailPriceCode = 1 ad MSRP
> between 16001 and 32000.
>
> But it returns all resuts with MSRP = 1 and doesnt consider 2nd query at
> all.
>
> Am i doing something wrong here? Please help
>
Reply | Threaded
Open this post in threaded view
|

Re: Solr Query

iorixxx
In reply to this post by Vishal Patel
> I am running below query in query browser admin interface
>
> +RetailPriceCodeID:1 +MSRP:[16001.00 TO 32000.00]
>
> I think it should return only results with RetailPriceCode
> = 1 ad MSRP
> between 16001 and 32000.
>
> But it returns all resuts with MSRP = 1 and doesnt consider
> 2nd query at
> all.
>
> Am i doing something wrong here? Please help

You query is perfectly fine.  However range queries require trie based or sortable based types. tfloat tdouble etc.