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 sammael <22...@gmail.com> on 2007/08/02 11:12:57 UTC

why solr eat my and word

post.addParameter("q","(post_date:[1185989000000 TO *])and(catregory_id:2)");

returned result contains category_id ==1

also in the case of
post.addParameter("q","(post_date:[1185989000000 TO *])");
post.addParameter("qf","((forum_id:1 forum_id:2)and(category_id:2)");

returned result contains category_id ==1 too

It's a bug or I'm doing anithing wrong?

-- 
View this message in context: http://www.nabble.com/why-solr-eat-my-and-word-tf4204987.html#a11960988
Sent from the Solr - User mailing list archive at Nabble.com.


Re: why solr and clause not working

Posted by sammael <22...@gmail.com>.

sorry carefully read lucen syntax manual

use && instead and all works fine now
-- 
View this message in context: http://www.nabble.com/why-solr-and-clause-not-working-tf4204987.html#a11961242
Sent from the Solr - User mailing list archive at Nabble.com.


Re: why solr eat my and word

Posted by Pieter Berkel <pi...@gmail.com>.
I realize you've fixed the problem by replacing "and" with "&&" but it's
worthwhile to note that boolean operators in lucene are case-sensitive, you
must use uppercase "AND" and "OR" in your query for it to work properly.

cheers,
Piete



On 02/08/07, sammael <22...@gmail.com> wrote:
>
>
> post.addParameter("q","(post_date:[1185989000000 TO
> *])and(catregory_id:2)");
>
> returned result contains category_id ==1
>
> also in the case of
> post.addParameter("q","(post_date:[1185989000000 TO *])");
> post.addParameter("qf","((forum_id:1 forum_id:2)and(category_id:2)");
>
> returned result contains category_id ==1 too
>
> It's a bug or I'm doing anithing wrong?
>
> --
> View this message in context:
> http://www.nabble.com/why-solr-eat-my-and-word-tf4204987.html#a11960988
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>