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 Jay Fisher <ja...@gmail.com> on 2009/12/31 04:16:00 UTC
Correct syntax for solrJ filter queries
I'm using solrJ to construct a query and it works just fine until I add the
following.
query.setFilterQueries("price:[*+TO+500]", "price:[500+TO+*]");
That generates this error
Caused by: org.apache.solr.common.SolrException: Bad Request
Bad Request
request:
http://balboa:8085/apache-solr-1.4.0/core0/select?q=red&facet=true&fl=*,score&rows=20&fq=price:[*+TO+500]&fq=price:[500+TO+*]&wt=javabin&version=1
What is the proper syntax for specifying a set of facet.queries?
Re: Correct syntax for solrJ filter queries
Posted by Jay Fisher <ja...@gmail.com>.
Thanks! That did it.
~ Jay
On Wed, Dec 30, 2009 at 9:58 PM, Erik Hatcher <er...@gmail.com>wrote:
> Use query.addFacetQuery(str) instead.
>
> Erik
>
>
> On Dec 30, 2009, at 10:16 PM, Jay Fisher wrote:
>
> I'm using solrJ to construct a query and it works just fine until I add
>> the
>> following.
>>
>>
>> query.setFilterQueries("price:[*+TO+500]", "price:[500+TO+*]");
>>
>>
>> That generates this error
>>
>>
>> Caused by: org.apache.solr.common.SolrException: Bad Request
>>
>>
>> Bad Request
>>
>>
>> request:
>>
>> http://balboa:8085/apache-solr-1.4.0/core0/select?q=red&facet=true&fl=*,score&rows=20&fq=price
>> :[*+TO+500]&fq=price:[500+TO+*]&wt=javabin&version=1
>>
>>
>> What is the proper syntax for specifying a set of facet.queries?
>>
>
>
Re: Correct syntax for solrJ filter queries
Posted by Erik Hatcher <er...@gmail.com>.
Use query.addFacetQuery(str) instead.
Erik
On Dec 30, 2009, at 10:16 PM, Jay Fisher wrote:
> I'm using solrJ to construct a query and it works just fine until I
> add the
> following.
>
>
> query.setFilterQueries("price:[*+TO+500]", "price:[500+TO+*]");
>
>
> That generates this error
>
>
> Caused by: org.apache.solr.common.SolrException: Bad Request
>
>
> Bad Request
>
>
> request:
> http://balboa:8085/apache-solr-1.4.0/core0/select?q=red&facet=true&fl=*,score&rows=20&fq=price
> :[*+TO+500]&fq=price:[500+TO+*]&wt=javabin&version=1
>
>
> What is the proper syntax for specifying a set of facet.queries?