SuggestResult Class

  • java.lang.Object
    • com.azure.search.documents.models.SuggestResult

Implements

public final class SuggestResult
implements JsonSerializable<SuggestResult>

A result containing a document found by a suggestion query, plus associated metadata.

Constructor Summary

Constructor Description
SuggestResult()

Creates an instance of SuggestResult class.

Method Summary

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

Reads an instance of SuggestResult from the JsonReader.

Map<String,Object> getAdditionalProperties()

Get the additionalProperties property: A result containing a document found by a suggestion query, plus associated metadata.

String getText()

Get the text property: The text of the suggestion result.

SuggestResult setAdditionalProperties(Map<String,Object> additionalProperties)

Set the additionalProperties property: A result containing a document found by a suggestion query, plus associated metadata.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SuggestResult

public SuggestResult()

Creates an instance of SuggestResult class.

Method Details

fromJson

public static SuggestResult fromJson(JsonReader jsonReader)

Reads an instance of SuggestResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SuggestResult 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.

getAdditionalProperties

public Map<String,Object> getAdditionalProperties()

Get the additionalProperties property: A result containing a document found by a suggestion query, plus associated metadata.

Returns:

the additionalProperties value.

getText

public String getText()

Get the text property: The text of the suggestion result.

Returns:

the text value.

setAdditionalProperties

public SuggestResult setAdditionalProperties(Map<String,Object> additionalProperties)

Set the additionalProperties property: A result containing a document found by a suggestion query, plus associated metadata.

Parameters:

additionalProperties - the additionalProperties value to set.

Returns:

the SuggestResult object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to