Send feedback
Class SearchRequest.ContentSearchSpec.SnippetSpec.Builder (0.16.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.16.0 keyboard_arrow_down
public static final class SearchRequest . ContentSearchSpec . SnippetSpec . Builder extends GeneratedMessageV3 . Builder<SearchRequest . ContentSearchSpec . SnippetSpec . Builder > implements SearchRequest . ContentSearchSpec . SnippetSpecOrBuilder
The specification that configs the snippet in the search results.
Protobuf type
google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Overrides
build()
public SearchRequest . ContentSearchSpec . SnippetSpec build ()
buildPartial()
public SearchRequest . ContentSearchSpec . SnippetSpec buildPartial ()
clear()
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder clear ()
Overrides
clearField(Descriptors.FieldDescriptor field)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder clearField ( Descriptors . FieldDescriptor field )
Overrides
clearMaxSnippetCount()
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder clearMaxSnippetCount ()
Max number of snippets returned in each search result.
A snippet is an infomartive summary of a content with highlighting for
UI rendering.
If the matching snippets is less than the max_snippet_count, return all
of the snippets; otherwise, return the max_snippet_count.
At most 5 snippets will be returned for each SearchResult.
int32 max_snippet_count = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Overrides
clearReferenceOnly()
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder clearReferenceOnly ()
if true, only snippet reference is returned.
bool reference_only = 2;
clone()
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder clone ()
Overrides
getDefaultInstanceForType()
public SearchRequest . ContentSearchSpec . SnippetSpec getDefaultInstanceForType ()
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
getMaxSnippetCount()
public int getMaxSnippetCount ()
Max number of snippets returned in each search result.
A snippet is an infomartive summary of a content with highlighting for
UI rendering.
If the matching snippets is less than the max_snippet_count, return all
of the snippets; otherwise, return the max_snippet_count.
At most 5 snippets will be returned for each SearchResult.
int32 max_snippet_count = 1;
Returns Type Description int
The maxSnippetCount.
getReferenceOnly()
public boolean getReferenceOnly ()
if true, only snippet reference is returned.
bool reference_only = 2;
Returns Type Description boolean
The referenceOnly.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
mergeFrom(SearchRequest.ContentSearchSpec.SnippetSpec other)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder mergeFrom ( SearchRequest . ContentSearchSpec . SnippetSpec other )
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder mergeFrom ( Message other )
Parameter Name Description other
Message
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SearchRequest . ContentSearchSpec . SnippetSpec . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Overrides
setMaxSnippetCount(int value)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder setMaxSnippetCount ( int value )
Max number of snippets returned in each search result.
A snippet is an infomartive summary of a content with highlighting for
UI rendering.
If the matching snippets is less than the max_snippet_count, return all
of the snippets; otherwise, return the max_snippet_count.
At most 5 snippets will be returned for each SearchResult.
int32 max_snippet_count = 1;
Parameter Name Description value
int
The maxSnippetCount to set.
setReferenceOnly(boolean value)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder setReferenceOnly ( boolean value )
if true, only snippet reference is returned.
bool reference_only = 2;
Parameter Name Description value
boolean
The referenceOnly to set.
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SearchRequest . ContentSearchSpec . SnippetSpec . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final SearchRequest . ContentSearchSpec . SnippetSpec . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
Need to tell us more?
[[["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-01-28 UTC."],[],[]]