If you can use "+" and "-", please do so. That's what Lucene uses under the covers (MUST, SHOULD, MUST NOT). Anything else is mapping to that.
You can also enable the debug flag on your queries and see exactly how the other forms (e.g. AND) are mapped to the underlying Lucene queries. Regards, Alex. ---- Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter: http://www.solr-start.com/ On 21 August 2015 at 10:34, Brian Narsi <bnars...@gmail.com> wrote: > CustomerID is a string > CustomerName is text > > I have a query like this (i.e. (CustomerID is NULL or CustomerID = 56789) > and (CustomerName like smith)): > > ((-(CustomerID: [* TO *])) OR (CustomerID: 56789))AND(CustomerName:"smith") > > Number of results: 150 (Not correct) > > But when I change the query to > > ((-(CustomerID: [* TO *])) OR (CustomerID: 56789))+(CustomerName:"smith") > > Number of results: 340 (Correct) > > Why is that? > > > Where can I read more about + vs AND in solr querying? > > How does the order of query clauses matter? > > Thanks in advance