v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1322188183.1 KB
projects

Searches for documents using provided SearchDocumentsRequest. This call only returns documents that the caller has permission to search against.

post/v1/{+parent}/documents:search

Path parameters

parentstring required

Required. The parent, which owns this collection of documents. Format: projects/{project_number}/locations/{location}.

Request body

requireTotalSizeboolean

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.

orderBystring

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.

totalResultSize'TOTAL_RESULT_SIZE_UNSPECIFIED' | 'ESTIMATED_SIZE' | 'ACTUAL_SIZE'

Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size.

pageTokenstring

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.

qaSizeLimitinteger

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.

pageSizeinteger

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.

offsetinteger

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).

Response

Successful response