-
Notifications
You must be signed in to change notification settings - Fork 370
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
Top-level inner hits support #308
Comments
Seems like this is a quite new option, I haven't seen it before, hence it is not implemented, but you are able to do a small patch here https://github.com/toptal/chewy/blob/master/lib/chewy/query.rb the same way as other chainable methods are implemented. |
I made that pull request #955 but I have abandoned it because it looks like you can query Also to quote the linked elasticsearch docs:
Which seems to contradict that Finally, when I did get inner_hits to work, I found them to be too limiting with Seems to me this issue should be closed. |
I am currently calling this query in curl and works accordingly. I was wondering if there would be a workaround with have this done with a raw query. The problem with calling it in
Index.query({})
is that it wraps itself in a "query" key. Where as I need the inner_hits at the same level as the query.The query can't be wrapped inside of anything else, cannot use the
Index.filter { r(hash_here) }
because it wraps it in the the filtered layer.I would see it as something available like
Index.query(query_hash).inner_hits(inner_hash)
or as a quick solution to allow passing in a hash that isn't wrapped by anything.The text was updated successfully, but these errors were encountered: