You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A query_string that includes a field of type nested (e.g. related_identifiers.relation:"isPartOf" AND related_identifiers.identifier:"10.1234/foo.123"), won't actually work as expected, and cannot be part of a query_string search (contrary to object-type fields, which are fine to include in a query_string).
This doesn't necessarily mean that the choice to make nested fields is incorrect though (see ES docs).
To actually make the query work one would have to include a nested query, which of course is not possible using the current search factory.
One possible way to deal with this is to parse the querystring using the luqum Lucene query parser libary, detect a nested field term and extract it into a complementary nested query. This might be an overkill though and if not implemented correctly, end up being error-prone, thus breaking queries that would normally work...
(Relevant issue and comment in elasticsearch-py. Also, it's possibly worth exploring in the future, after upgrading to ES6+, the Kuery language)
The text was updated successfully, but these errors were encountered:
A
query_string
that includes a field of typenested
(e.g.related_identifiers.relation:"isPartOf" AND related_identifiers.identifier:"10.1234/foo.123"
), won't actually work as expected, and cannot be part of aquery_string
search (contrary toobject
-type fields, which are fine to include in aquery_string
).This doesn't necessarily mean that the choice to make
nested
fields is incorrect though (see ES docs).To actually make the query work one would have to include a
nested
query, which of course is not possible using the current search factory.One possible way to deal with this is to parse the querystring using the
luqum
Lucene query parser libary, detect a nested field term and extract it into a complementary nested query. This might be an overkill though and if not implemented correctly, end up being error-prone, thus breaking queries that would normally work...(Relevant issue and comment in
elasticsearch-py
. Also, it's possibly worth exploring in the future, after upgrading to ES6+, theKuery
language)The text was updated successfully, but these errors were encountered: