Class SearchDocumentsResponse.MatchingDocument.Builder (0.41.0)

public static final class SearchDocumentsResponse.MatchingDocument.Builder extends GeneratedMessageV3.Builder<SearchDocumentsResponse.MatchingDocument.Builder> implements SearchDocumentsResponse.MatchingDocumentOrBuilder

Document entry with metadata inside SearchDocumentsResponse

Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsResponse.MatchingDocument

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllMatchedTokenPageIndices(Iterable<? extends Long> values)

public SearchDocumentsResponse.MatchingDocument.Builder addAllMatchedTokenPageIndices(Iterable<? extends Long> values)

Return the 1-based page indices where those pages have one or more matched tokens.

repeated int64 matched_token_page_indices = 4;

Parameter
Name Description
values Iterable<? extends java.lang.Long>

The matchedTokenPageIndices to add.

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

addMatchedTokenPageIndices(long value)

public SearchDocumentsResponse.MatchingDocument.Builder addMatchedTokenPageIndices(long value)

Return the 1-based page indices where those pages have one or more matched tokens.

repeated int64 matched_token_page_indices = 4;

Parameter
Name Description
value long

The matchedTokenPageIndices to add.

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SearchDocumentsResponse.MatchingDocument.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

build()

public SearchDocumentsResponse.MatchingDocument build()
Returns
Type Description
SearchDocumentsResponse.MatchingDocument

buildPartial()

public SearchDocumentsResponse.MatchingDocument buildPartial()
Returns
Type Description
SearchDocumentsResponse.MatchingDocument

clear()

public SearchDocumentsResponse.MatchingDocument.Builder clear()
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

clearDocument()

public SearchDocumentsResponse.MatchingDocument.Builder clearDocument()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

clearField(Descriptors.FieldDescriptor field)

public SearchDocumentsResponse.MatchingDocument.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

clearMatchedTokenPageIndices()

public SearchDocumentsResponse.MatchingDocument.Builder clearMatchedTokenPageIndices()

Return the 1-based page indices where those pages have one or more matched tokens.

repeated int64 matched_token_page_indices = 4;

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SearchDocumentsResponse.MatchingDocument.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

clearQaResult()

public SearchDocumentsResponse.MatchingDocument.Builder clearQaResult()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

clearSearchTextSnippet()

public SearchDocumentsResponse.MatchingDocument.Builder clearSearchTextSnippet()

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

clone()

public SearchDocumentsResponse.MatchingDocument.Builder clone()
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

getDefaultInstanceForType()

public SearchDocumentsResponse.MatchingDocument getDefaultInstanceForType()
Returns
Type Description
SearchDocumentsResponse.MatchingDocument

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDocument()

public Document getDocument()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
Type Description
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
Type Description
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
Type Description
DocumentOrBuilder

getMatchedTokenPageIndices(int index)

public long getMatchedTokenPageIndices(int index)

Return the 1-based page indices where those pages have one or more matched tokens.

repeated int64 matched_token_page_indices = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
long

The matchedTokenPageIndices at the given index.

getMatchedTokenPageIndicesCount()

public int getMatchedTokenPageIndicesCount()

Return the 1-based page indices where those pages have one or more matched tokens.

repeated int64 matched_token_page_indices = 4;

Returns
Type Description
int

The count of matchedTokenPageIndices.

getMatchedTokenPageIndicesList()

public List<Long> getMatchedTokenPageIndicesList()

Return the 1-based page indices where those pages have one or more matched tokens.

repeated int64 matched_token_page_indices = 4;

Returns
Type Description
List<Long>

A list containing the matchedTokenPageIndices.

getQaResult()

public QAResult getQaResult()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
Type Description
QAResult

The qaResult.

getQaResultBuilder()

public QAResult.Builder getQaResultBuilder()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
Type Description
QAResult.Builder

getQaResultOrBuilder()

public QAResultOrBuilder getQaResultOrBuilder()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
Type Description
QAResultOrBuilder

getSearchTextSnippet()

public String getSearchTextSnippet()

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Returns
Type Description
String

The searchTextSnippet.

getSearchTextSnippetBytes()

public ByteString getSearchTextSnippetBytes()

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Returns
Type Description
ByteString

The bytes for searchTextSnippet.

hasDocument()

public boolean hasDocument()

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Returns
Type Description
boolean

Whether the document field is set.

hasQaResult()

public boolean hasQaResult()

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Returns
Type Description
boolean

Whether the qaResult field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDocument(Document value)

public SearchDocumentsResponse.MatchingDocument.Builder mergeDocument(Document value)

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Parameter
Name Description
value Document
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

mergeFrom(SearchDocumentsResponse.MatchingDocument other)

public SearchDocumentsResponse.MatchingDocument.Builder mergeFrom(SearchDocumentsResponse.MatchingDocument other)
Parameter
Name Description
other SearchDocumentsResponse.MatchingDocument
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SearchDocumentsResponse.MatchingDocument.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SearchDocumentsResponse.MatchingDocument.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

mergeQaResult(QAResult value)

public SearchDocumentsResponse.MatchingDocument.Builder mergeQaResult(QAResult value)

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Parameter
Name Description
value QAResult
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SearchDocumentsResponse.MatchingDocument.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

setDocument(Document value)

public SearchDocumentsResponse.MatchingDocument.Builder setDocument(Document value)

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Parameter
Name Description
value Document
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

setDocument(Document.Builder builderForValue)

public SearchDocumentsResponse.MatchingDocument.Builder setDocument(Document.Builder builderForValue)

Document that matches the specified SearchDocumentsRequest. This document only contains indexed metadata information.

.google.cloud.contentwarehouse.v1.Document document = 1;

Parameter
Name Description
builderForValue Document.Builder
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SearchDocumentsResponse.MatchingDocument.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

setMatchedTokenPageIndices(int index, long value)

public SearchDocumentsResponse.MatchingDocument.Builder setMatchedTokenPageIndices(int index, long value)

Return the 1-based page indices where those pages have one or more matched tokens.

repeated int64 matched_token_page_indices = 4;

Parameters
Name Description
index int

The index to set the value at.

value long

The matchedTokenPageIndices to set.

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

setQaResult(QAResult value)

public SearchDocumentsResponse.MatchingDocument.Builder setQaResult(QAResult value)

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Parameter
Name Description
value QAResult
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

setQaResult(QAResult.Builder builderForValue)

public SearchDocumentsResponse.MatchingDocument.Builder setQaResult(QAResult.Builder builderForValue)

Experimental. Additional result info if the question-answering feature is enabled.

.google.cloud.contentwarehouse.v1.QAResult qa_result = 3;

Parameter
Name Description
builderForValue QAResult.Builder
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SearchDocumentsResponse.MatchingDocument.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides

setSearchTextSnippet(String value)

public SearchDocumentsResponse.MatchingDocument.Builder setSearchTextSnippet(String value)

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Parameter
Name Description
value String

The searchTextSnippet to set.

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

setSearchTextSnippetBytes(ByteString value)

public SearchDocumentsResponse.MatchingDocument.Builder setSearchTextSnippetBytes(ByteString value)

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags.

If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural-language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights.

string search_text_snippet = 2;

Parameter
Name Description
value ByteString

The bytes for searchTextSnippet to set.

Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SearchDocumentsResponse.MatchingDocument.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SearchDocumentsResponse.MatchingDocument.Builder
Overrides