Reference documentation and code samples for the Google Cloud Discovery Engine V1beta Client class SnippetSpec.
The specification that configs the snippet in the search results.
Generated from protobuf message google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec
Namespace
Google \ Cloud \ DiscoveryEngine \ V1beta \ SearchRequest \ ContentSearchSpecMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ max_snippet_count |
int
Max number of snippets returned in each search result. A snippet is an infomartive summary of a content with highlighting for UI rendering. If the matching snippets is less than the max_snippet_count, return all of the snippets; otherwise, return the max_snippet_count. At most 5 snippets will be returned for each SearchResult. |
↳ reference_only |
bool
if true, only snippet reference is returned. |
getMaxSnippetCount
Max number of snippets returned in each search result.
A snippet is an infomartive summary of a content with highlighting for UI rendering. If the matching snippets is less than the max_snippet_count, return all of the snippets; otherwise, return the max_snippet_count. At most 5 snippets will be returned for each SearchResult.
Returns | |
---|---|
Type | Description |
int |
setMaxSnippetCount
Max number of snippets returned in each search result.
A snippet is an infomartive summary of a content with highlighting for UI rendering. If the matching snippets is less than the max_snippet_count, return all of the snippets; otherwise, return the max_snippet_count. At most 5 snippets will be returned for each SearchResult.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getReferenceOnly
if true, only snippet reference is returned.
Returns | |
---|---|
Type | Description |
bool |
setReferenceOnly
if true, only snippet reference is returned.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |