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 Jonathan Rochkind <ro...@jhu.edu> on 2010/06/03 19:55:09 UTC

solr-lucene AND vs "+"

Using solr-lucene query parser, is there a difference between using 
"AND" and using "+" in querries like this:

1)   q= some_field:( one AND two AND "some phrase")

2)   q= some_field:(+one +two +"some phrase")

Are those always exactly identical in all respects, or are there any 
differences in terms of result sets, relevancy ranking, or potentially 
performance?

Thanks for any advice,

Jonathan

Re: solr-lucene AND vs "+"

Posted by Ahmet Arslan <io...@yahoo.com>.
> Using solr-lucene query parser, is
> there a difference between using "AND" and using "+" in
> querries like this:
> 
> 1)   q= some_field:( one AND two AND "some
> phrase")
> 
> 2)   q= some_field:(+one +two +"some
> phrase")
> 
> Are those always exactly identical in all respects, or are
> there any differences in terms of result sets, relevancy
> ranking, or potentially performance?

Your two examples are identical. You can verify this by adding &debugQuery=on to your search URL. 
AND OR NOT operators parsed/converted into their + - forms.

About unitary operators versus AND OR NOT :
http://wiki.apache.org/lucene-java/BooleanQuerySyntax