I believe correct formats for OR search query are the following:
id:(id1 or id2)
id:id1 or id:id2
When I tried searching with "id:id1 or id2", it is parsing the query into
"id:id1 or _text_:id2" where _text_ is the field from solr's default config
Also, for this, I need to add the _text_ field into my schema.xml otherwise
it returns an error saying
"msg":"undefined field _text_",
I get it that query statement "id:id1 or id2" is incorrect and no wonder
solr is returning the up written error but what I didn't understand is why
isn't this happening for the Leader Node.
Irrespective of the search query, Leader Node is always parsing the query
correctly and this is not the case for some particular Leader node. At
first, Core_Node2 was returning the error but after some time leader
switched and Core_Node1 started returning the error while Core_Node2 parsing
the query correctly.
And by correctly I mean that "id:id1 or id2" is being parsed to "id:1 (id:or
On 8/9/2018 7:31 PM, tapan1707 wrote:
> I believe correct formats for OR search query are the following:
> id:(id1 or id2)
> id:id1 or id:id2
The correct form for an OR query is an uppercase "OR". The lowercase
"or" won't do the same thing -- typically it will be interpreted as just
another search term.
When using the edismax query parser, there is a parameter
lowercaseOperators that (if set to true) will cause Solr to interpret
the lowercase version as an operator. This *only* works with the
edismax query parser. The default setting for lowercaseOperators was
true before 7.0, in 7.0 the default was changed to false.
I have no idea why one node would work differently than another. That
sort of thing doesn't normally happen.