Re: Solr Query + vs AND

2015-08-21 Thread Shawn Heisey
On 8/21/2015 8:34 AM, Brian Narsi 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)): Note that you must leave the default operator as "OR" for +/- syntax to work as intended. It wil

Re: Solr Query + vs AND

2015-08-21 Thread Erick Erickson
You might find this useful: https://lucidworks.com/blog/why-not-and-or-and-not/ Best, Erick On Fri, Aug 21, 2015 at 7:58 AM, Alexandre Rafalovitch wrote: > 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 >

Re: Solr Query + vs AND

2015-08-21 Thread Alexandre Rafalovitch
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,

Solr Query + vs AND

2015-08-21 Thread Brian Narsi
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