# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SnippetSpec (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.2 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::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

    def max_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=

    def max_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

    def reference_only() -> ::Boolean

**Returns**

- (::Boolean) --- \[DEPRECATED\] This field is deprecated and will have no affect on the snippet.

### #reference_only=

    def reference_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

    def return_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=

    def return_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.