-
Notifications
You must be signed in to change notification settings - Fork 46
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
Native plugin script under nested #25
Comments
Dealing with nested documents is tricky. The problem is nested documents are indexed as separate documents, they can be only searched by |
Thanks for the super quick response. I am trying to perform operations (add a filter) on fields stored as analyzed. These operations need to occur on the entire string, context of which is lost in the index unless this is indexed in a multifield index. Due to cost constraints (ie use case not justifying cost of redundant storage), we are left with going only for index as analyzed. So, I am using the script to fetch the field from source (as the last filter) to filter out unwanted results. The field could be nested or non nested. We haven't yet evaluated the performance impact of this approach just yet. That being said, the approach of finding parent to extract source sounds interesting. I may be missing something, but all I care about in my script is the value of the nested field only. To clarify, I don't need the entire parent source if that can be avoided, just the nested document field value. Would be great if you could point me to the relevant classes/methods that I could look into for either of the two approaches. Thanks! |
Hi imotov,
I went through your examples, but wasn't able to find one where you use a script for a nested document under 'nested'. The challenge I am facing there is that the source()/doc() fetch gives me 0 results even though I do expect matches. I believe that may have to do with nested documents being stored as a separate document, but I am not sure.
Would appreciate any help! Thanks for writing up all these examples! :)
The text was updated successfully, but these errors were encountered: