public sealed class SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec : IMessage<SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec>, IEquatable<SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec>, IDeepCloneable<SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1beta API class SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec.
Specifies the chunk spec to be returned from the search response.
Only available if the
[SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
is set to
[CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eChunkSpec\u003c/code\u003e class defines the specifications for retrieving chunks in search responses from the Discovery Engine v1beta API.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eSearchRequest.Types.ContentSearchSpec.Types\u003c/code\u003e nested structure and is used to specify how content should be chunked during search operations.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eChunkSpec\u003c/code\u003e is only utilized when the \u003ccode\u003eSearchRequest.ContentSearchSpec.search_result_mode\u003c/code\u003e is set to \u003ccode\u003eCHUNKS\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows you to set the number of previous and next chunks to be returned with the current chunk, with a maximum of 3 for each direction.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructors for the class, one being a default and the second allowing it to be made from another given \u003ccode\u003eChunkSpec\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec) \n\n public sealed class SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec : IMessage\u003cSearchRequest.Types.ContentSearchSpec.Types.ChunkSpec\u003e, IEquatable\u003cSearchRequest.Types.ContentSearchSpec.Types.ChunkSpec\u003e, IDeepCloneable\u003cSearchRequest.Types.ContentSearchSpec.Types.ChunkSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1beta API class SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec.\n\nSpecifies the chunk spec to be returned from the search response.\nOnly available if the\n\\[SearchRequest.ContentSearchSpec.search_result_mode\\]\\[google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode\\]\nis set to\n\\[CHUNKS\\]\\[google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS\\] \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SearchRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types)[ContentSearchSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types)[ChunkSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SearchRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types)[ContentSearchSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types)[ChunkSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SearchRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types)[ContentSearchSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types)[ChunkSpec](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.dll\n\nConstructors\n------------\n\n### ChunkSpec()\n\n public ChunkSpec()\n\n### ChunkSpec(ChunkSpec)\n\n public ChunkSpec(SearchRequest.Types.ContentSearchSpec.Types.ChunkSpec other)\n\nProperties\n----------\n\n### NumNextChunks\n\n public int NumNextChunks { get; set; }\n\nThe number of next chunks to be returned of the current chunk. The\nmaximum allowed value is 3.\nIf not specified, no next chunks will be returned.\n\n### NumPreviousChunks\n\n public int NumPreviousChunks { get; set; }\n\nThe number of previous chunks to be returned of the current chunk. The\nmaximum allowed value is 3.\nIf not specified, no previous chunks will be returned."]]