Google Cloud Discovery Engine V1beta Client - Class SnippetSpec (0.8.0)

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

A specification for configuring snippets in a search response.

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

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta \ SearchRequest \ ContentSearchSpec

Methods

__construct

Constructor.

Parameters
NameDescription
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
TypeDescription
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
NameDescription
var int
Returns
TypeDescription
$this

getReferenceOnly

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

Returns
TypeDescription
bool

setReferenceOnly

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

Parameter
NameDescription
var bool
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var bool
Returns
TypeDescription
$this