Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search: queries for "nested" fields not possible #155

Open
slint opened this issue Nov 5, 2018 · 0 comments
Open

search: queries for "nested" fields not possible #155

slint opened this issue Nov 5, 2018 · 0 comments

Comments

@slint
Copy link
Member

slint commented Nov 5, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants