# Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::SearchInfo (v0.28.0)

0.28.0 (latest) 0.27.0 0.26.0 0.25.0 0.24.0 0.23.1 0.22.0 0.21.0 0.20.1 0.19.1 0.18.0 0.17.0 0.16.0 0.15.0 0.14.2 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.2 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SearchInfo.

Detailed search information.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #offset

    def offset() -> ::Integer

**Returns**

- (::Integer) --- An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).

  See
  [SearchRequest.offset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_offset_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#offset (method)")
  for definition.

  If this field is negative, an `INVALID_ARGUMENT` is returned.

  This can only be set for `search` events. Other event types should not set
  this field. Otherwise, an `INVALID_ARGUMENT` error is returned.

### #offset=

    def offset=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).


  See
  [SearchRequest.offset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_offset_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#offset (method)")
  for definition.

  If this field is negative, an `INVALID_ARGUMENT` is returned.

  This can only be set for `search` events. Other event types should not set
  this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
**Returns**

- (::Integer) --- An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).

  See
  [SearchRequest.offset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_offset_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#offset (method)")
  for definition.

  If this field is negative, an `INVALID_ARGUMENT` is returned.

  This can only be set for `search` events. Other event types should not set
  this field. Otherwise, an `INVALID_ARGUMENT` error is returned.

### #order_by

    def order_by() -> ::String

**Returns**

- (::String) --- The order in which products are returned, if applicable.

  See
  [SearchRequest.order_by](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_order_by_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#order_by (method)")
  for definition and syntax.

  The value must be a UTF-8 encoded string with a length limit of 1,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  This can only be set for `search` events. Other event types should not set
  this field. Otherwise, an `INVALID_ARGUMENT` error is returned.

### #order_by=

    def order_by=(value) -> ::String

**Parameter**

- **value** (::String) --- The order in which products are returned, if applicable.


  See
  [SearchRequest.order_by](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_order_by_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#order_by (method)")
  for definition and syntax.

  The value must be a UTF-8 encoded string with a length limit of 1,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  This can only be set for `search` events. Other event types should not set
  this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
**Returns**

- (::String) --- The order in which products are returned, if applicable.

  See
  [SearchRequest.order_by](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_order_by_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#order_by (method)")
  for definition and syntax.

  The value must be a UTF-8 encoded string with a length limit of 1,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  This can only be set for `search` events. Other event types should not set
  this field. Otherwise, an `INVALID_ARGUMENT` error is returned.

### #search_query

    def search_query() -> ::String

**Returns**

- (::String) --- The user's search query.

  See
  [SearchRequest.query](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_query_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#query (method)")
  for definition.

  The value must be a UTF-8 encoded string with a length limit of 5,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  At least one of
  [search_query](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchInfo#Google__Cloud__DiscoveryEngine__V1beta__SearchInfo_search_query_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchInfo#search_query (method)")
  or
  [PageInfo.page_category](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-PageInfo#Google__Cloud__DiscoveryEngine__V1beta__PageInfo_page_category_instance_ "Google::Cloud::DiscoveryEngine::V1beta::PageInfo#page_category (method)")
  is required for `search` events. Other event types should not set this
  field. Otherwise, an `INVALID_ARGUMENT` error is returned.

### #search_query=

    def search_query=(value) -> ::String

**Parameter**

- **value** (::String) --- The user's search query.


  See
  [SearchRequest.query](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_query_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#query (method)")
  for definition.

  The value must be a UTF-8 encoded string with a length limit of 5,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  At least one of
  [search_query](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchInfo#Google__Cloud__DiscoveryEngine__V1beta__SearchInfo_search_query_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchInfo#search_query (method)")
  or
  [PageInfo.page_category](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-PageInfo#Google__Cloud__DiscoveryEngine__V1beta__PageInfo_page_category_instance_ "Google::Cloud::DiscoveryEngine::V1beta::PageInfo#page_category (method)")
  is required for `search` events. Other event types should not set this
  field. Otherwise, an `INVALID_ARGUMENT` error is returned.
**Returns**

- (::String) --- The user's search query.

  See
  [SearchRequest.query](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest_query_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest#query (method)")
  for definition.

  The value must be a UTF-8 encoded string with a length limit of 5,000
  characters. Otherwise, an `INVALID_ARGUMENT` error is returned.

  At least one of
  [search_query](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchInfo#Google__Cloud__DiscoveryEngine__V1beta__SearchInfo_search_query_instance_ "Google::Cloud::DiscoveryEngine::V1beta::SearchInfo#search_query (method)")
  or
  [PageInfo.page_category](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-PageInfo#Google__Cloud__DiscoveryEngine__V1beta__PageInfo_page_category_instance_ "Google::Cloud::DiscoveryEngine::V1beta::PageInfo#page_category (method)")
  is required for `search` events. Other event types should not set this
  field. Otherwise, an `INVALID_ARGUMENT` error is returned.