public final class SearchDocumentsRequest extends GeneratedMessageV3 implements SearchDocumentsRequestOrBuilder
Request message for DocumentService.SearchDocuments.
Protobuf type google.cloud.contentwarehouse.v1.SearchDocumentsRequest
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
DOCUMENT_QUERY_FIELD_NUMBER
public static final int DOCUMENT_QUERY_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
HISTOGRAM_QUERIES_FIELD_NUMBER
public static final int HISTOGRAM_QUERIES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
OFFSET_FIELD_NUMBER
public static final int OFFSET_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
ORDER_BY_FIELD_NUMBER
public static final int ORDER_BY_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PAGE_SIZE_FIELD_NUMBER
public static final int PAGE_SIZE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PAGE_TOKEN_FIELD_NUMBER
public static final int PAGE_TOKEN_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PARENT_FIELD_NUMBER
public static final int PARENT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
QA_SIZE_LIMIT_FIELD_NUMBER
public static final int QA_SIZE_LIMIT_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
REQUEST_METADATA_FIELD_NUMBER
public static final int REQUEST_METADATA_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
REQUIRE_TOTAL_SIZE_FIELD_NUMBER
public static final int REQUIRE_TOTAL_SIZE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
TOTAL_RESULT_SIZE_FIELD_NUMBER
public static final int TOTAL_RESULT_SIZE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static SearchDocumentsRequest getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static SearchDocumentsRequest.Builder newBuilder()
newBuilder(SearchDocumentsRequest prototype)
public static SearchDocumentsRequest.Builder newBuilder(SearchDocumentsRequest prototype)
parseDelimitedFrom(InputStream input)
public static SearchDocumentsRequest parseDelimitedFrom(InputStream input)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static SearchDocumentsRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static SearchDocumentsRequest parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static SearchDocumentsRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static SearchDocumentsRequest parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static SearchDocumentsRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
parseFrom(CodedInputStream input)
public static SearchDocumentsRequest parseFrom(CodedInputStream input)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static SearchDocumentsRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(InputStream input)
public static SearchDocumentsRequest parseFrom(InputStream input)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static SearchDocumentsRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static SearchDocumentsRequest parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static SearchDocumentsRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<SearchDocumentsRequest> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public SearchDocumentsRequest getDefaultInstanceForType()
getDocumentQuery()
public DocumentQuery getDocumentQuery()
Query used to search against documents (keyword, filters, etc.).
.google.cloud.contentwarehouse.v1.DocumentQuery document_query = 4;
getDocumentQueryOrBuilder()
public DocumentQueryOrBuilder getDocumentQueryOrBuilder()
Query used to search against documents (keyword, filters, etc.).
.google.cloud.contentwarehouse.v1.DocumentQuery document_query = 4;
getHistogramQueries(int index)
public HistogramQuery getHistogramQueries(int index)
An expression specifying a histogram request against matching
documents. Expression syntax is an aggregation function call with
histogram facets and other options.
The following aggregation functions are supported:
count(string_histogram_facet)
: Count the number of matching entities
for each distinct attribute value.
Data types:
- Histogram facet (aka filterable properties): Facet names with format
<schema id>.<facet>. Facets will have the
format of:
a-zA-Z
. If the facet is a child
facet, then the parent hierarchy needs to be specified separated by
dots in the prefix after the schema id. Thus, the format for a multi-
level facet is: <schema id>.<parent facet name>.
<child facet name>. Example:
schema123.root_parent_facet.middle_facet.child_facet
- DocumentSchemaId: (with no schema id prefix) to get
histograms for each document type (returns the schema id path, e.g.
projects/12345/locations/us-west/documentSchemas/abc123).
Example expression:
- Document type counts:
count('DocumentSchemaId')
- For schema id, abc123, get the counts for MORTGAGE_TYPE:
count('abc123.MORTGAGE_TYPE')
repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;
Parameter |
---|
Name | Description |
index | int
|
getHistogramQueriesCount()
public int getHistogramQueriesCount()
An expression specifying a histogram request against matching
documents. Expression syntax is an aggregation function call with
histogram facets and other options.
The following aggregation functions are supported:
count(string_histogram_facet)
: Count the number of matching entities
for each distinct attribute value.
Data types:
- Histogram facet (aka filterable properties): Facet names with format
<schema id>.<facet>. Facets will have the
format of:
a-zA-Z
. If the facet is a child
facet, then the parent hierarchy needs to be specified separated by
dots in the prefix after the schema id. Thus, the format for a multi-
level facet is: <schema id>.<parent facet name>.
<child facet name>. Example:
schema123.root_parent_facet.middle_facet.child_facet
- DocumentSchemaId: (with no schema id prefix) to get
histograms for each document type (returns the schema id path, e.g.
projects/12345/locations/us-west/documentSchemas/abc123).
Example expression:
- Document type counts:
count('DocumentSchemaId')
- For schema id, abc123, get the counts for MORTGAGE_TYPE:
count('abc123.MORTGAGE_TYPE')
repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;
Returns |
---|
Type | Description |
int | |
getHistogramQueriesList()
public List<HistogramQuery> getHistogramQueriesList()
An expression specifying a histogram request against matching
documents. Expression syntax is an aggregation function call with
histogram facets and other options.
The following aggregation functions are supported:
count(string_histogram_facet)
: Count the number of matching entities
for each distinct attribute value.
Data types:
- Histogram facet (aka filterable properties): Facet names with format
<schema id>.<facet>. Facets will have the
format of:
a-zA-Z
. If the facet is a child
facet, then the parent hierarchy needs to be specified separated by
dots in the prefix after the schema id. Thus, the format for a multi-
level facet is: <schema id>.<parent facet name>.
<child facet name>. Example:
schema123.root_parent_facet.middle_facet.child_facet
- DocumentSchemaId: (with no schema id prefix) to get
histograms for each document type (returns the schema id path, e.g.
projects/12345/locations/us-west/documentSchemas/abc123).
Example expression:
- Document type counts:
count('DocumentSchemaId')
- For schema id, abc123, get the counts for MORTGAGE_TYPE:
count('abc123.MORTGAGE_TYPE')
repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;
getHistogramQueriesOrBuilder(int index)
public HistogramQueryOrBuilder getHistogramQueriesOrBuilder(int index)
An expression specifying a histogram request against matching
documents. Expression syntax is an aggregation function call with
histogram facets and other options.
The following aggregation functions are supported:
count(string_histogram_facet)
: Count the number of matching entities
for each distinct attribute value.
Data types:
- Histogram facet (aka filterable properties): Facet names with format
<schema id>.<facet>. Facets will have the
format of:
a-zA-Z
. If the facet is a child
facet, then the parent hierarchy needs to be specified separated by
dots in the prefix after the schema id. Thus, the format for a multi-
level facet is: <schema id>.<parent facet name>.
<child facet name>. Example:
schema123.root_parent_facet.middle_facet.child_facet
- DocumentSchemaId: (with no schema id prefix) to get
histograms for each document type (returns the schema id path, e.g.
projects/12345/locations/us-west/documentSchemas/abc123).
Example expression:
- Document type counts:
count('DocumentSchemaId')
- For schema id, abc123, get the counts for MORTGAGE_TYPE:
count('abc123.MORTGAGE_TYPE')
repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;
Parameter |
---|
Name | Description |
index | int
|
getHistogramQueriesOrBuilderList()
public List<? extends HistogramQueryOrBuilder> getHistogramQueriesOrBuilderList()
An expression specifying a histogram request against matching
documents. Expression syntax is an aggregation function call with
histogram facets and other options.
The following aggregation functions are supported:
count(string_histogram_facet)
: Count the number of matching entities
for each distinct attribute value.
Data types:
- Histogram facet (aka filterable properties): Facet names with format
<schema id>.<facet>. Facets will have the
format of:
a-zA-Z
. If the facet is a child
facet, then the parent hierarchy needs to be specified separated by
dots in the prefix after the schema id. Thus, the format for a multi-
level facet is: <schema id>.<parent facet name>.
<child facet name>. Example:
schema123.root_parent_facet.middle_facet.child_facet
- DocumentSchemaId: (with no schema id prefix) to get
histograms for each document type (returns the schema id path, e.g.
projects/12345/locations/us-west/documentSchemas/abc123).
Example expression:
- Document type counts:
count('DocumentSchemaId')
- For schema id, abc123, get the counts for MORTGAGE_TYPE:
count('abc123.MORTGAGE_TYPE')
repeated .google.cloud.contentwarehouse.v1.HistogramQuery histogram_queries = 9;
Returns |
---|
Type | Description |
List<? extends com.google.cloud.contentwarehouse.v1.HistogramQueryOrBuilder> | |
getOffset()
An integer that specifies the current offset (that is, starting result
location, amongst the documents deemed by the API as relevant) in search
results. This field is only considered if
page_token
is unset.
The maximum allowed value is 5000. Otherwise an error is thrown.
For example, 0 means to return results starting from the first matching
document, and 10 means to return from the 11th document. This can be used
for pagination, (for example, pageSize = 10 and offset = 10 means to return
from the second page).
int32 offset = 5;
Returns |
---|
Type | Description |
int | The offset.
|
getOrderBy()
public String getOrderBy()
The criteria determining how search results are sorted. For non-empty
query, default is "relevance desc"
. For empty query, default is
"upload_date desc"
.
Supported options are:
"relevance desc"
: By relevance descending, as determined by the API
algorithms.
"upload_date desc"
: By upload date descending.
"upload_date"
: By upload date ascending.
"update_date desc"
: By last updated date descending.
"update_date"
: By last updated date ascending.
"retrieval_importance desc"
: By retrieval importance of properties
descending. This feature is still under development, please do not use
unless otherwise instructed to do so.
string order_by = 8;
Returns |
---|
Type | Description |
String | The orderBy.
|
getOrderByBytes()
public ByteString getOrderByBytes()
The criteria determining how search results are sorted. For non-empty
query, default is "relevance desc"
. For empty query, default is
"upload_date desc"
.
Supported options are:
"relevance desc"
: By relevance descending, as determined by the API
algorithms.
"upload_date desc"
: By upload date descending.
"upload_date"
: By upload date ascending.
"update_date desc"
: By last updated date descending.
"update_date"
: By last updated date ascending.
"retrieval_importance desc"
: By retrieval importance of properties
descending. This feature is still under development, please do not use
unless otherwise instructed to do so.
string order_by = 8;
Returns |
---|
Type | Description |
ByteString | The bytes for orderBy.
|
getPageSize()
A limit on the number of documents returned in the search results.
Increasing this value above the default value of 10 can increase search
response time. The value can be between 1 and 100.
int32 page_size = 6;
Returns |
---|
Type | Description |
int | The pageSize.
|
getPageToken()
public String getPageToken()
The token specifying the current offset within search results.
See
SearchDocumentsResponse.next_page_token
for an explanation of how to obtain the next set of query results.
string page_token = 7;
Returns |
---|
Type | Description |
String | The pageToken.
|
getPageTokenBytes()
public ByteString getPageTokenBytes()
The token specifying the current offset within search results.
See
SearchDocumentsResponse.next_page_token
for an explanation of how to obtain the next set of query results.
string page_token = 7;
Returns |
---|
Type | Description |
ByteString | The bytes for pageToken.
|
getParent()
public String getParent()
Required. The parent, which owns this collection of documents.
Format: projects/{project_number}/locations/{location}.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns |
---|
Type | Description |
String | The parent.
|
getParentBytes()
public ByteString getParentBytes()
Required. The parent, which owns this collection of documents.
Format: projects/{project_number}/locations/{location}.
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns |
---|
Type | Description |
ByteString | The bytes for parent.
|
getParserForType()
public Parser<SearchDocumentsRequest> getParserForType()
Overrides
getQaSizeLimit()
public int getQaSizeLimit()
Experimental, do not use.
The limit on the number of documents returned for the question-answering
feature. To enable the question-answering feature, set
[DocumentQuery].[is_nl_query][] to true.
int32 qa_size_limit = 11;
Returns |
---|
Type | Description |
int | The qaSizeLimit.
|
getRequestMetadata()
public RequestMetadata getRequestMetadata()
The meta information collected about the end user, used to enforce access
control and improve the search quality of the service.
.google.cloud.contentwarehouse.v1.RequestMetadata request_metadata = 3;
getRequestMetadataOrBuilder()
public RequestMetadataOrBuilder getRequestMetadataOrBuilder()
The meta information collected about the end user, used to enforce access
control and improve the search quality of the service.
.google.cloud.contentwarehouse.v1.RequestMetadata request_metadata = 3;
getRequireTotalSize()
public boolean getRequireTotalSize()
Controls if the search document request requires the return of a total size
of matched documents. See
SearchDocumentsResponse.total_size.
Enabling this flag may adversely impact performance. Hint: If this is
used with pagination, set this flag on the initial query but set this
to false on subsequent page calls (keep the total count locally).
Defaults to false.
bool require_total_size = 10;
Returns |
---|
Type | Description |
boolean | The requireTotalSize.
|
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getTotalResultSize()
public SearchDocumentsRequest.TotalResultSize getTotalResultSize()
Controls if the search document request requires the return of a total size
of matched documents. See
SearchDocumentsResponse.total_size.
.google.cloud.contentwarehouse.v1.SearchDocumentsRequest.TotalResultSize total_result_size = 12;
getTotalResultSizeValue()
public int getTotalResultSizeValue()
Controls if the search document request requires the return of a total size
of matched documents. See
SearchDocumentsResponse.total_size.
.google.cloud.contentwarehouse.v1.SearchDocumentsRequest.TotalResultSize total_result_size = 12;
Returns |
---|
Type | Description |
int | The enum numeric value on the wire for totalResultSize.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Overrides
hasDocumentQuery()
public boolean hasDocumentQuery()
Query used to search against documents (keyword, filters, etc.).
.google.cloud.contentwarehouse.v1.DocumentQuery document_query = 4;
Returns |
---|
Type | Description |
boolean | Whether the documentQuery field is set.
|
hasRequestMetadata()
public boolean hasRequestMetadata()
The meta information collected about the end user, used to enforce access
control and improve the search quality of the service.
.google.cloud.contentwarehouse.v1.RequestMetadata request_metadata = 3;
Returns |
---|
Type | Description |
boolean | Whether the requestMetadata field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public SearchDocumentsRequest.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected SearchDocumentsRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public SearchDocumentsRequest.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides