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

Support "ignore_unmapped":true for script based sorting on unmapped fields #2453

Closed
dannymcpherson opened this issue Nov 29, 2012 · 4 comments
Labels

Comments

@dannymcpherson
Copy link

...Or perhaps make ignore_unmapped true by default only for script based sorting.

@tom-martin
Copy link

+1 on this. Anyone aware of any workarounds in the meantime?

@tom-martin
Copy link

Testing doc.containsKey("whatevs") works :)

@ethier
Copy link

ethier commented May 28, 2013

+1 on this. I'm getting the following when specifying ignore_unmapped true on sorts for indices without one or all or the sort mappings. This is on 0.90.0 too.

ReduceSearchPhaseException[Failed to execute phase [query], [reduce] ]; nested: ArrayIndexOutOfBoundsException[1]

@clintongormley
Copy link

Thinking about this issue again, it seems to me that the best way to handle missing values in these cases is with doc.containsKey(), as suggested by @tom-martin. You're already inside a script, which allows you to make whatever decision you want in order to handle the missing-value case. Just adding (the now deprecated) ignore_unmapped parameter (see #7039) to this seems like a blunt instrument.

Closing this ticket.

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

No branches or pull requests

4 participants