QueryCaptionResult Class

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

Implements

public final class QueryCaptionResult
implements JsonSerializable<QueryCaptionResult>

Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type `semantic`.

Constructor Summary

Constructor Description
QueryCaptionResult()

Creates an instance of QueryCaptionResult class.

Method Summary

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

Reads an instance of QueryCaptionResult from the JsonReader.

Map<String,Object> getAdditionalProperties()

Get the additionalProperties property: Captions are the most representative passages from the document relatively to the search query.

String getHighlights()

Get the highlights property: Same text passage as in the Text property with highlighted phrases most relevant to the query.

String getText()

Get the text property: A representative text passage extracted from the document most relevant to the search query.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

QueryCaptionResult

public QueryCaptionResult()

Creates an instance of QueryCaptionResult class.

Method Details

fromJson

public static QueryCaptionResult fromJson(JsonReader jsonReader)

Reads an instance of QueryCaptionResult from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of QueryCaptionResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the QueryCaptionResult.

getAdditionalProperties

public Map getAdditionalProperties()

Get the additionalProperties property: Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type `semantic`.

Returns:

the additionalProperties value.

getHighlights

public String getHighlights()

Get the highlights property: Same text passage as in the Text property with highlighted phrases most relevant to the query.

Returns:

the highlights value.

getText

public String getText()

Get the text property: A representative text passage extracted from the document most relevant to the search query.

Returns:

the text value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to