Google Cloud Discovery Engine V1 Client - Class ContentSearchSpec (1.3.2)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class ContentSearchSpec.

A specification for configuring the behavior of content search.

Generated from protobuf message google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ SearchRequest

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ snippet_spec ContentSearchSpec\SnippetSpec

If snippetSpec is not specified, snippets are not included in the search response.

↳ summary_spec ContentSearchSpec\SummarySpec

If summarySpec is not specified, summaries are not included in the search response.

↳ extractive_content_spec ContentSearchSpec\ExtractiveContentSpec

If there is no extractive_content_spec provided, there will be no extractive answer in the search response.

↳ search_result_mode int

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS.

↳ chunk_spec ContentSearchSpec\ChunkSpec

Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS

getSnippetSpec

If snippetSpec is not specified, snippets are not included in the search response.

Returns
Type Description
ContentSearchSpec\SnippetSpec|null

hasSnippetSpec

clearSnippetSpec

setSnippetSpec

If snippetSpec is not specified, snippets are not included in the search response.

Parameter
Name Description
var ContentSearchSpec\SnippetSpec
Returns
Type Description
$this

getSummarySpec

If summarySpec is not specified, summaries are not included in the search response.

Returns
Type Description
ContentSearchSpec\SummarySpec|null

hasSummarySpec

clearSummarySpec

setSummarySpec

If summarySpec is not specified, summaries are not included in the search response.

Parameter
Name Description
var ContentSearchSpec\SummarySpec
Returns
Type Description
$this

getExtractiveContentSpec

If there is no extractive_content_spec provided, there will be no extractive answer in the search response.

Returns
Type Description
ContentSearchSpec\ExtractiveContentSpec|null

hasExtractiveContentSpec

clearExtractiveContentSpec

setExtractiveContentSpec

If there is no extractive_content_spec provided, there will be no extractive answer in the search response.

Parameter
Name Description
var ContentSearchSpec\ExtractiveContentSpec
Returns
Type Description
$this

getSearchResultMode

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS.

Returns
Type Description
int

setSearchResultMode

Specifies the search result mode. If unspecified, the search result mode defaults to DOCUMENTS.

Parameter
Name Description
var int
Returns
Type Description
$this

getChunkSpec

Specifies the chunk spec to be returned from the search response.

Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS

Returns
Type Description
ContentSearchSpec\ChunkSpec|null

hasChunkSpec

clearChunkSpec

setChunkSpec

Specifies the chunk spec to be returned from the search response.

Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS

Parameter
Name Description
var ContentSearchSpec\ChunkSpec
Returns
Type Description
$this