QueryCaption Class

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

public final class QueryCaption

Configuration for how semantic search captions search results.

Constructor Summary

Constructor Description
QueryCaption(QueryCaptionType captionType)

Creates a new instance of QueryCaption.

Method Summary

Modifier and Type Method and Description
QueryCaptionType getCaptionType()

Gets the type of captions to generate.

Integer getMaxCharLength()

Gets the maximum number of characters to include in the caption.

Boolean isHighlightEnabled()

Whether to highlight the captioned text in the result.

QueryCaption setHighlightEnabled(Boolean highlightEnabled)

Sets whether to highlight the captioned text in the result.

QueryCaption setMaxCharLength(Integer maxCharLength)

Sets the maximum number of characters to include in the caption.

Methods inherited from java.lang.Object

Constructor Details

QueryCaption

public QueryCaption(QueryCaptionType captionType)

Creates a new instance of QueryCaption.

Parameters:

captionType - The type of captions to generate.

Method Details

getCaptionType

public QueryCaptionType getCaptionType()

Gets the type of captions to generate.

Returns:

The type of captions to generate.

getMaxCharLength

public Integer getMaxCharLength()

Gets the maximum number of characters to include in the caption.

Returns:

The maximum number of characters to include in the caption.

isHighlightEnabled

public Boolean isHighlightEnabled()

Whether to highlight the captioned text in the result.

Returns:

Whether to highlight the captioned text in the result.

setHighlightEnabled

public QueryCaption setHighlightEnabled(Boolean highlightEnabled)

Sets whether to highlight the captioned text in the result.

Parameters:

highlightEnabled - Whether to highlight the captioned text in the result.

Returns:

The QueryCaption object itself.

setMaxCharLength

public QueryCaption setMaxCharLength(Integer maxCharLength)

Sets the maximum number of characters to include in the caption.

Parameters:

maxCharLength - The maximum number of characters to include in the caption.

Returns:

The QueryCaption object itself.

Applies to