0.3.0 (latest) 0.2.1 0.1.0 Reference documentation and code samples for the Developer Knowledge V1 API class Google::Developers::DeveloperKnowledge::V1::SearchDocumentChunksRequest.

Request message for
[DeveloperKnowledge.SearchDocumentChunks](https://developers.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest/Google-Developers-DeveloperKnowledge-V1-DeveloperKnowledge-Client#Google__Developers__DeveloperKnowledge__V1__DeveloperKnowledge__Client_search_document_chunks_instance_ "Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client#search_document_chunks (method)").

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #filter

    def filter() -> ::String

**Returns**

- (::String) --- Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.

  While `SearchDocumentChunks` returns
  [DocumentChunk](https://developers.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest/Google-Developers-DeveloperKnowledge-V1-DocumentChunk "Google::Developers::DeveloperKnowledge::V1::DocumentChunk (class)")s, the filter
  is applied to `DocumentChunk.document` fields.

  Supported fields for filtering:
  - `content_length_bytes` (INTEGER): The length of the `Document.content` field in bytes.
  - `data_source` (STRING): The source of the document, e.g. `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  - `update_time` (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  - `uri` (STRING): The document URI, e.g. `https://docs.cloud.google.com/bigquery/docs/tables`.

  INTEGER fields support `=`, `<`, `<=`, `>`, and `>=` operators.

  STRING fields support `=` (equals) and `!=` (not equals) operators for
  **exact match** on the whole string. Partial match, prefix match, and
  regexp match are not supported.

  TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators.
  Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`.

  Note: Field names must be in `snake_case` (e.g., `data_source`). Values on
  the right-hand side of filtering expressions must be string literals
  enclosed in double quotes (e.g., `"docs.cloud.google.com"`).

  You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical
  operators. `OR` has higher precedence than `AND`. Use parentheses for
  explicit precedence grouping.

  Examples:
  - Filter by `Document.content_length_bytes`: `content_length_bytes < 50000`
  - `data_source = "docs.cloud.google.com" OR data_source =
    "firebase.google.com"`
  - `data_source != "firebase.google.com"`
  - `update_time < "2024-01-01T00:00:00Z"`
  - `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
    "developer.chrome.com" OR data_source = "web.dev")`
  - `uri = "https://docs.cloud.google.com/release-notes"`

  The `filter` string must not exceed 500 characters; values longer than 500
  characters will result in an `INVALID_ARGUMENT` error.

### #filter=

    def filter=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.


  While `SearchDocumentChunks` returns
  [DocumentChunk](https://developers.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest/Google-Developers-DeveloperKnowledge-V1-DocumentChunk "Google::Developers::DeveloperKnowledge::V1::DocumentChunk (class)")s, the filter
  is applied to `DocumentChunk.document` fields.

  Supported fields for filtering:
  - `content_length_bytes` (INTEGER): The length of the `Document.content` field in bytes.
  - `data_source` (STRING): The source of the document, e.g. `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  - `update_time` (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  - `uri` (STRING): The document URI, e.g. `https://docs.cloud.google.com/bigquery/docs/tables`.

  INTEGER fields support `=`, `<`, `<=`, `>`, and `>=` operators.

  STRING fields support `=` (equals) and `!=` (not equals) operators for
  **exact match** on the whole string. Partial match, prefix match, and
  regexp match are not supported.

  TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators.
  Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`.

  Note: Field names must be in `snake_case` (e.g., `data_source`). Values on
  the right-hand side of filtering expressions must be string literals
  enclosed in double quotes (e.g., `"docs.cloud.google.com"`).

  You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical
  operators. `OR` has higher precedence than `AND`. Use parentheses for
  explicit precedence grouping.

  Examples:
  - Filter by `Document.content_length_bytes`: `content_length_bytes < 50000`
  - `data_source = "docs.cloud.google.com" OR data_source =
    "firebase.google.com"`
  - `data_source != "firebase.google.com"`
  - `update_time < "2024-01-01T00:00:00Z"`
  - `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
    "developer.chrome.com" OR data_source = "web.dev")`
  - `uri = "https://docs.cloud.google.com/release-notes"`

  The `filter` string must not exceed 500 characters; values longer than 500
  characters will result in an `INVALID_ARGUMENT` error.
**Returns**

- (::String) --- Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160.

  While `SearchDocumentChunks` returns
  [DocumentChunk](https://developers.google.com/ruby/docs/reference/google-developers-developer_knowledge-v1/latest/Google-Developers-DeveloperKnowledge-V1-DocumentChunk "Google::Developers::DeveloperKnowledge::V1::DocumentChunk (class)")s, the filter
  is applied to `DocumentChunk.document` fields.

  Supported fields for filtering:
  - `content_length_bytes` (INTEGER): The length of the `Document.content` field in bytes.
  - `data_source` (STRING): The source of the document, e.g. `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus.
  - `update_time` (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document's markdown content or metadata.
  - `uri` (STRING): The document URI, e.g. `https://docs.cloud.google.com/bigquery/docs/tables`.

  INTEGER fields support `=`, `<`, `<=`, `>`, and `>=` operators.

  STRING fields support `=` (equals) and `!=` (not equals) operators for
  **exact match** on the whole string. Partial match, prefix match, and
  regexp match are not supported.

  TIMESTAMP fields support `=`, `<`, `<=`, `>`, and `>=` operators.
  Timestamps must be in RFC-3339 format, e.g., `"2025-01-01T00:00:00Z"`.

  Note: Field names must be in `snake_case` (e.g., `data_source`). Values on
  the right-hand side of filtering expressions must be string literals
  enclosed in double quotes (e.g., `"docs.cloud.google.com"`).

  You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical
  operators. `OR` has higher precedence than `AND`. Use parentheses for
  explicit precedence grouping.

  Examples:
  - Filter by `Document.content_length_bytes`: `content_length_bytes < 50000`
  - `data_source = "docs.cloud.google.com" OR data_source =
    "firebase.google.com"`
  - `data_source != "firebase.google.com"`
  - `update_time < "2024-01-01T00:00:00Z"`
  - `update_time >= "2025-01-22T00:00:00Z" AND (data_source =
    "developer.chrome.com" OR data_source = "web.dev")`
  - `uri = "https://docs.cloud.google.com/release-notes"`

  The `filter` string must not exceed 500 characters; values longer than 500
  characters will result in an `INVALID_ARGUMENT` error.

### #page_size

    def page_size() -> ::Integer

**Returns**

- (::Integer) --- Optional. Specifies the maximum number of results to return. The service may return fewer than this value.

  If unspecified, at most 5 results will be returned.

  The maximum value is 100; values above 100 will be coerced to 100.

### #page_size=

    def page_size=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Optional. Specifies the maximum number of results to return. The service may return fewer than this value.


  If unspecified, at most 5 results will be returned.

  The maximum value is 100; values above 100 will be coerced to 100.
**Returns**

- (::Integer) --- Optional. Specifies the maximum number of results to return. The service may return fewer than this value.

  If unspecified, at most 5 results will be returned.

  The maximum value is 100; values above 100 will be coerced to 100.

### #page_token

    def page_token() -> ::String

**Returns**

- (::String) --- Optional. Contains a page token, received from a previous `SearchDocumentChunks` call. Provide this to retrieve the subsequent page.

### #page_token=

    def page_token=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Contains a page token, received from a previous `SearchDocumentChunks` call. Provide this to retrieve the subsequent page.
**Returns**

- (::String) --- Optional. Contains a page token, received from a previous `SearchDocumentChunks` call. Provide this to retrieve the subsequent page.

### #query

    def query() -> ::String

**Returns**

- (::String) --- Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?". The query must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error.

### #query=

    def query=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?". The query must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error.
**Returns**

- (::String) --- Required. Provides the raw query string provided by the user, such as "How to create a Cloud Storage bucket?". The query must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error.