Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsRequest

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/contentwarehouse_v1/classes.rb,
lib/google/apis/contentwarehouse_v1/representations.rb,
lib/google/apis/contentwarehouse_v1/representations.rb

Overview

Request message for DocumentService.SearchDocuments.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContentwarehouseV1SearchDocumentsRequest

Returns a new instance of GoogleCloudContentwarehouseV1SearchDocumentsRequest.



3533
3534
3535
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3533

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#document_queryGoogle::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1DocumentQuery

Query used to search against documents (keyword, filters, etc.). Corresponds to the JSON property documentQuery



3446
3447
3448
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3446

def document_query
  @document_query
end

#histogram_queriesArray<Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1HistogramQuery>

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 .. 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: .. . 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') Corresponds to the JSON property histogramQueries



3465
3466
3467
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3465

def histogram_queries
  @histogram_queries
end

#offsetFixnum

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). Corresponds to the JSON property offset

Returns:

  • (Fixnum)


3476
3477
3478
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3476

def offset
  @offset
end

#order_byString

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. Corresponds to the JSON property orderBy

Returns:

  • (String)


3489
3490
3491
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3489

def order_by
  @order_by
end

#page_sizeFixnum

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. Corresponds to the JSON property pageSize

Returns:

  • (Fixnum)


3496
3497
3498
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3496

def page_size
  @page_size
end

#page_tokenString

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. Corresponds to the JSON property pageToken

Returns:

  • (String)


3503
3504
3505
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3503

def page_token
  @page_token
end

#qa_size_limitFixnum

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. Corresponds to the JSON property qaSizeLimit

Returns:

  • (Fixnum)


3510
3511
3512
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3510

def qa_size_limit
  @qa_size_limit
end

#request_metadataGoogle::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1RequestMetadata

Meta information is used to improve the performance of the service. Corresponds to the JSON property requestMetadata



3515
3516
3517
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3515

def 
  @request_metadata
end

#require_total_sizeBoolean Also known as: require_total_size?

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. Corresponds to the JSON property requireTotalSize

Returns:

  • (Boolean)


3524
3525
3526
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3524

def require_total_size
  @require_total_size
end

#total_result_sizeString

Controls if the search document request requires the return of a total size of matched documents. See SearchDocumentsResponse.total_size. Corresponds to the JSON property totalResultSize

Returns:

  • (String)


3531
3532
3533
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3531

def total_result_size
  @total_result_size
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3538

def update!(**args)
  @document_query = args[:document_query] if args.key?(:document_query)
  @histogram_queries = args[:histogram_queries] if args.key?(:histogram_queries)
  @offset = args[:offset] if args.key?(:offset)
  @order_by = args[:order_by] if args.key?(:order_by)
  @page_size = args[:page_size] if args.key?(:page_size)
  @page_token = args[:page_token] if args.key?(:page_token)
  @qa_size_limit = args[:qa_size_limit] if args.key?(:qa_size_limit)
  @request_metadata = args[:request_metadata] if args.key?(:request_metadata)
  @require_total_size = args[:require_total_size] if args.key?(:require_total_size)
  @total_result_size = args[:total_result_size] if args.key?(:total_result_size)
end