OpenSearch/plugins/examples/custom-suggester/src
Christoph Büscher 7f690e8606 Fix suggestions for empty indices (#42927)
Currently suggesters return null values on empty shards. Usually this gets replaced
by results from other non-epmty shards, but if the index is completely epmty (e.g. after
creation) the search responses "suggest" is also "null" and we don't render a corresponding
output in the REST response. This is an irritating edge case that requires special handling on
the user side (see #42473) and should be fixed.

This change makes sure every suggester type (completion, terms, phrase) returns at least an
empty skeleton suggestion output, even for empty shards. This way, even if we don't find
any suggestions anywhere, we still return and output the empty suggestion.

Closes #42473
2019-06-12 15:42:23 +02:00
..
main/java/org/elasticsearch/example/customsuggester Fix suggestions for empty indices (#42927) 2019-06-12 15:42:23 +02:00
test Removes typed calls from YAML REST tests (#37611) 2019-01-30 16:32:58 +00:00