Class SearchSuggester
java.lang.Object
com.azure.search.documents.indexes.models.SearchSuggester
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SearchSuggester>
public final class SearchSuggester
extends Object
implements com.azure.json.JsonSerializable<SearchSuggester>
Defines how the Suggest API should apply to a group of fields in the index.
-
Constructor Summary
ConstructorsConstructorDescriptionSearchSuggester(String name, List<String> sourceFields) Creates an instance of SearchSuggester class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchSuggesterfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SearchSuggester from the JsonReader.getName()Get the name property: The name of the suggester.Get the searchMode property: A value indicating the capabilities of the suggester.Get the sourceFields property: The list of field names to which the suggester applies.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SearchSuggester
Creates an instance of SearchSuggester class.- Parameters:
name- the name value to set.sourceFields- the sourceFields value to set.
-
-
Method Details
-
getName
Get the name property: The name of the suggester.- Returns:
- the name value.
-
getSearchMode
Get the searchMode property: A value indicating the capabilities of the suggester.- Returns:
- the searchMode value.
-
getSourceFields
Get the sourceFields property: The list of field names to which the suggester applies. Each field must be searchable.- Returns:
- the sourceFields value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SearchSuggester>- Throws:
IOException
-
fromJson
Reads an instance of SearchSuggester from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SearchSuggester if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the SearchSuggester.
-