Re: Use boolean operator "-", the result is incorrect

2020-04-08 Thread Chris Hostetter
: Solr/Lucene do not employ boolean logic. See Hossman’s excellent post: : : https://lucidworks.com/post/why-not-and-or-and-not/ : : Until you internalize this rather subtle difference, you’ll be surprised. A lot ;). : : You can make query parsing look a lot like boolean logic by carefully usin

Re: Use boolean operator "-", the result is incorrect

2020-04-08 Thread Erick Erickson
Solr/Lucene do not employ boolean logic. See Hossman’s excellent post: https://lucidworks.com/post/why-not-and-or-and-not/ Until you internalize this rather subtle difference, you’ll be surprised. A lot ;). You can make query parsing look a lot like boolean logic by carefully using parentheses

Re: Use boolean operator "-", the result is incorrect

2020-04-08 Thread Bernd Fehling
About first query, you have a negative query telling the searcher to give only results _NOT_ containing "name_s:a". From that result list you want only results of "age_i:10". Boolean table for OR is: 0 OR 0 = 0 1 OR 0 = 1 0 OR 1 = 1 1 OR 1 = 1 You get one result. About second query your "parsedque

Re: Use boolean operator "-", the result is incorrect

2020-04-08 Thread Bernd Fehling
What is debugQuery telling you about: - "rawquerystring" - "querystring" - "parsedquery" - "parsedquery_toString" - "QParser" Also what is your default query operator, AND or OR? This is what matters for your second example with id:("1" "2") It could be id:("1" AND "2") or id:("1" OR "2") . R

Re: Use boolean operator "-", the result is incorrect

2020-04-08 Thread Bernd Fehling
Looks correct to me. You have to obey the level of the operators and the parenthesis. Turn debugQuery on to see the results of parsing of your query. Regards Bernd Am 08.04.20 um 09:34 schrieb slly: > > > If the following query is executed, the result is different: > > > id:("1" "2") AND (-n