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_next_chunks
int
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.
getNumPreviousChunks
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
Type
Description
int
setNumPreviousChunks
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.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getNumNextChunks
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
Type
Description
int
setNumNextChunks
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.
[[["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,["# Google Cloud Discovery Engine V1 Client - Class ChunkSpec (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.SearchRequest.ContentSearchSpec.ChunkSpec)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.SearchRequest.ContentSearchSpec.ChunkSpec) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class ChunkSpec.\n\nSpecifies the chunk spec to be returned from the search response.\n\nOnly available if the\n[SearchRequest.ContentSearchSpec.search_result_mode](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest.ContentSearchSpec#_Google_Cloud_DiscoveryEngine_V1_SearchRequest_ContentSearchSpec__getSearchResultMode__)\nis set to\n[CHUNKS](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest.ContentSearchSpec.SearchResultMode#_Google_Cloud_DiscoveryEngine_V1_SearchRequest_ContentSearchSpec_SearchResultMode__CHUNKS)\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ChunkSpec`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1 \\\\ SearchRequest \\\\ ContentSearchSpec\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getNumPreviousChunks\n\nThe number of previous chunks to be returned of the current chunk. The\nmaximum allowed value is 3.\n\nIf not specified, no previous chunks will be returned.\n\n### setNumPreviousChunks\n\nThe number of previous chunks to be returned of the current chunk. The\nmaximum allowed value is 3.\n\nIf not specified, no previous chunks will be returned.\n\n### getNumNextChunks\n\nThe number of next chunks to be returned of the current chunk. The\nmaximum allowed value is 3.\n\nIf not specified, no next chunks will be returned.\n\n### setNumNextChunks\n\nThe number of next chunks to be returned of the current chunk. The\nmaximum allowed value is 3.\n\nIf not specified, no next chunks will be returned."]]