Sdílet prostřednictvím


SearchSuggester Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.SearchSuggester

Implements

public final class SearchSuggester
implements JsonSerializable<SearchSuggester>

Defines how the Suggest API should apply to a group of fields in the index.

Constructor Summary

Constructor Description
SearchSuggester(String name, List<String> sourceFields)

Creates an instance of SearchSuggester class.

Method Summary

Modifier and Type Method and Description
static SearchSuggester fromJson(JsonReader jsonReader)

Reads an instance of SearchSuggester from the JsonReader.

String getName()

Get the name property: The name of the suggester.

String getSearchMode()

Get the searchMode property: A value indicating the capabilities of the suggester.

List<String> getSourceFields()

Get the sourceFields property: The list of field names to which the suggester applies.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SearchSuggester

public SearchSuggester(String name, List sourceFields)

Creates an instance of SearchSuggester class.

Parameters:

name - the name value to set.
sourceFields - the sourceFields value to set.

Method Details

fromJson

public static SearchSuggester fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

getName

public String getName()

Get the name property: The name of the suggester.

Returns:

the name value.

getSearchMode

public String getSearchMode()

Get the searchMode property: A value indicating the capabilities of the suggester.

Returns:

the searchMode value.

getSourceFields

public List 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

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to