public class SuggestBuilder extends ToXContentToBytes
TermSuggestionBuilder instances.
Suggesting works by suggesting terms that appear in the suggest text that are similar compared to the terms in provided text. These spelling suggestions are based on several options described in this class.
| 修飾子とタイプ | クラスと説明 |
|---|---|
static class |
SuggestBuilder.SuggestionBuilder<T> |
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| コンストラクタと説明 |
|---|
SuggestBuilder() |
SuggestBuilder(String name) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
SuggestBuilder |
addSuggestion(SuggestBuilder.SuggestionBuilder<?> suggestion)
Adds an
TermSuggestionBuilder instance under a user defined name. |
List<SuggestBuilder.SuggestionBuilder<?>> |
getSuggestion()
Returns all suggestions with the defined names.
|
SuggestBuilder |
setText(String globalText)
Sets the text to provide suggestions for.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
buildAsBytes, buildAsBytes, toStringpublic SuggestBuilder()
public SuggestBuilder(String name)
public SuggestBuilder setText(String globalText)
setText(String) method.
The suggest text gets analyzed by the suggest analyzer or the suggest field search analyzer. For each analyzed token, suggested terms are suggested if possible.
public SuggestBuilder addSuggestion(SuggestBuilder.SuggestionBuilder<?> suggestion)
TermSuggestionBuilder instance under a user defined name.
The order in which the Suggestions are added, is the same as in the response.public List<SuggestBuilder.SuggestionBuilder<?>> getSuggestion()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.