Thanks Bernd for your reply. I run the query on the Solr Web UI in Solr 7.3.1/7.7.2, the screenshot of my execution results is as follows, I don't understand whether there is a grammatical error ? 1. -name_s:a OR age_i:10
2. id:("1" "2") AND (-name_s:a) At 2020-04-08 16:33:20, "Bernd Fehling" <bernd.fehl...@uni-bielefeld.de> wrote: >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 (-name_s:a) --> numFound is 0 >> >> >> id:("1" "2") AND -(name_s:a) --> numFound is 1 >> >> >> >> At 2020-04-08 14:56:26, "slly" <sll...@126.com> wrote: >>> Hello Folks, >>> We are using Solr 7.3.1, I write the following two lines of data into >>> collection: >>> id, name_s, age_i >>> 1, a, 10 >>> 2, b, 10 >>> Use the following query syntax: >>> -name_s:a OR age_i:10 >>> >>> >>> I think we should return two pieces of data, but actually only one piece of >>> data: >>> id, name_s, age_i >>> 2, b, 10 >>> >>> >>> Did I get it wrong? Looking forward to some valuable suggestions. Thanks.