Google Cloud Discovery Engine V1 Client - Class SnippetSpec (1.3.0)

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

A specification for configuring snippets in a search response.

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

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ SearchRequest \ ContentSearchSpec

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ max_snippet_count int

[DEPRECATED] This field is deprecated. To control snippet return, use return_snippet field. For backwards compatibility, we will return snippet if max_snippet_count > 0.

↳ reference_only bool

[DEPRECATED] This field is deprecated and will have no affect on the snippet.

↳ return_snippet bool

If true, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A snippet_status with SUCCESS or NO_SNIPPET_AVAILABLE will also be returned.

getMaxSnippetCount

[DEPRECATED] This field is deprecated. To control snippet return, use return_snippet field. For backwards compatibility, we will return snippet if max_snippet_count > 0.

Returns
Type Description
int

setMaxSnippetCount

[DEPRECATED] This field is deprecated. To control snippet return, use return_snippet field. For backwards compatibility, we will return snippet if max_snippet_count > 0.

Parameter
Name Description
var int
Returns
Type Description
$this

getReferenceOnly

[DEPRECATED] This field is deprecated and will have no affect on the snippet.

Returns
Type Description
bool

setReferenceOnly

[DEPRECATED] This field is deprecated and will have no affect on the snippet.

Parameter
Name Description
var bool
Returns
Type Description
$this

getReturnSnippet

If true, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A snippet_status with SUCCESS or NO_SNIPPET_AVAILABLE will also be returned.

Returns
Type Description
bool

setReturnSnippet

If true, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A snippet_status with SUCCESS or NO_SNIPPET_AVAILABLE will also be returned.

Parameter
Name Description
var bool
Returns
Type Description
$this