From e2e593745546083a31ccfb9744be6174dd312858 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Fri, 10 Feb 2017 10:53:38 +0100 Subject: Use `typed_keys` parameter to prefix suggester names by type in search responses (#23080) This pull request reuses the typed_keys parameter added in #22965, but this time it applies it to suggesters. When set to true, the suggester names in the search response will be prefixed with a prefix that reflects their type. --- .../search/suggest/completion/CompletionSuggestion.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'core/src/main/java/org/elasticsearch/search/suggest/completion') diff --git a/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestion.java b/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestion.java index 1d8da83271..e33e421f77 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestion.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/completion/CompletionSuggestion.java @@ -57,6 +57,8 @@ import static org.elasticsearch.search.suggest.Suggest.COMPARATOR; */ public final class CompletionSuggestion extends Suggest.Suggestion { + private static final String NAME = "completion"; + public static final int TYPE = 4; public CompletionSuggestion() { @@ -165,10 +167,15 @@ public final class CompletionSuggestion extends Suggest.Suggestion