# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::ChunkSpec (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::ChunkSpec.

Specifies the chunk spec to be returned from the search response.
Only available if the
[SearchRequest.ContentSearchSpec.search_result_mode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchRequest-ContentSearchSpec#Google__Cloud__DiscoveryEngine__V1__SearchRequest__ContentSearchSpec_search_result_mode_instance_ "Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode (method)")
is set to
[CHUNKS](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchRequest-ContentSearchSpec-SearchResultMode#Google__Cloud__DiscoveryEngine__V1__SearchRequest__ContentSearchSpec__SearchResultMode__CHUNKS "Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS (constant)")

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #num_next_chunks

    def num_next_chunks() -> ::Integer

**Returns**

- (::Integer) --- The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.

### #num_next_chunks=

    def num_next_chunks=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.
**Returns**

- (::Integer) --- The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.

### #num_previous_chunks

    def num_previous_chunks() -> ::Integer

**Returns**

- (::Integer) --- The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.

### #num_previous_chunks=

    def num_previous_chunks=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.
**Returns**

- (::Integer) --- The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.