Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SnippetSpec.
A specification for configuring snippets in a search response.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#max_snippet_count
defmax_snippet_count()->::Integer
Returns
(::Integer) — [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.
#max_snippet_count=
defmax_snippet_count=(value)->::Integer
Parameter
value (::Integer) — [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
(::Integer) — [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
defreference_only()->::Boolean
Returns
(::Boolean) — [DEPRECATED] This field is deprecated and will have no affect on the
snippet.
#reference_only=
defreference_only=(value)->::Boolean
Parameter
value (::Boolean) — [DEPRECATED] This field is deprecated and will have no affect on the
snippet.
Returns
(::Boolean) — [DEPRECATED] This field is deprecated and will have no affect on the
snippet.
#return_snippet
defreturn_snippet()->::Boolean
Returns
(::Boolean) — 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.
#return_snippet=
defreturn_snippet=(value)->::Boolean
Parameter
value (::Boolean) — 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
(::Boolean) — 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SnippetSpec (v0.21.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.21.0 (latest)](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.20.1](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.20.1/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.19.1](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.19.1/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.18.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.18.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.17.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.17.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.16.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.16.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.15.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.15.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.14.2](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.14.2/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.13.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.13.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.12.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.12.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.11.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.11.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.10.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.10.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.9.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.9.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.8.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.8.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.7.2](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.7.2/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.6.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.6.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.5.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.5.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.4.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.4.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.3.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.3.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.2.1](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.2.1/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec)\n- [0.1.0](/ruby/docs/reference/google-cloud-discovery_engine-v1beta/0.1.0/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-ContentSearchSpec-SnippetSpec) \nReference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SnippetSpec.\n\nA specification for configuring snippets in a search response. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #max_snippet_count\n\n def max_snippet_count() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- \\[DEPRECATED\\] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \\\u003e 0.\n\n### #max_snippet_count=\n\n def max_snippet_count=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- \\[DEPRECATED\\] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \\\u003e 0. \n**Returns**\n\n- (::Integer) --- \\[DEPRECATED\\] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \\\u003e 0.\n\n### #reference_only\n\n def reference_only() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- \\[DEPRECATED\\] This field is deprecated and will have no affect on the snippet.\n\n### #reference_only=\n\n def reference_only=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- \\[DEPRECATED\\] This field is deprecated and will have no affect on the snippet. \n**Returns**\n\n- (::Boolean) --- \\[DEPRECATED\\] This field is deprecated and will have no affect on the snippet.\n\n### #return_snippet\n\n def return_snippet() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- 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.\n\n### #return_snippet=\n\n def return_snippet=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- 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. \n**Returns**\n\n- (::Boolean) --- 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."]]