Thank you very much for your reply. I have understood the meaning of it.
https://lucidworks.com/post/why-not-and-or-and-not/
At 2020-04-09 01:45:14, "Chris Hostetter" wrote:
>: Solr/Lucene do not employ boolean logic. See Hossman’s excellent post:
>:
>: https://lucidworks.com/post/w
: 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
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
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
My default query operator is OR.There are two pieces of data in the index:
{ "id":"1", "name_s":"a", "age_i":10, "_version_":1663396766955864064}, {
"id":"2", "name_s":"b", "age_i":10, "_version_":1663396767058624512}] }
1. -name_s:a OR age_i:10 # I think two pieces of data should b
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
Thanks Bernd for your reply.
Can you tell me what your query syntax looks like?
At 2020-04-08 16:33:20, "Bernd Fehling" 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.
>
>Re
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 Fe
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
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
10 matches
Mail list logo