SearchSpec

Search specification.

JSON representation
{

  // Union field input can be only one of the following:
  "searchParams": {
    object (SearchParams)
  },
  "searchResultList": {
    object (SearchResultList)
  }
  // End of list of possible types for union field input.
}
Fields
Union field input. Search parameters to control the search behavior. Or provide search result list to generate answer. input can be only one of the following:
searchParams

object (SearchParams)

Search parameters.

searchResultList

object (SearchResultList)

Search result list.

SearchParams

Search parameters.

JSON representation
{
  "maxReturnResults": integer,
  "filter": string,
  "boostSpec": {
    object (BoostSpec)
  },
  "orderBy": string
}
Fields
maxReturnResults

integer

Number of search results to return. The default value is 10.

filter

string

The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response.

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")'

For more information about filtering including syntax and filter operators, see Filter

boostSpec

object (BoostSpec)

Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see Boosting

orderBy

string

The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. orderBy expression is case-sensitive. For more information on ordering, see Ordering

If this field is unrecognizable, an INVALID_ARGUMENT is returned.

SearchResultList

Search result list.

JSON representation
{
  "searchResults": [
    {
      object (SearchResult)
    }
  ]
}
Fields
searchResults[]

object (SearchResult)

Search results.

SearchResult

Search result.

JSON representation
{

  // Union field content can be only one of the following:
  "unstructuredDocumentInfo": {
    object (UnstructuredDocumentInfo)
  },
  "chunkInfo": {
    object (ChunkInfo)
  }
  // End of list of possible types for union field content.
}
Fields
Union field content. Search result content. content can be only one of the following:
unstructuredDocumentInfo

object (UnstructuredDocumentInfo)

Unstructured document information.

chunkInfo

object (ChunkInfo)

Chunk information.

UnstructuredDocumentInfo

Unstructured document information.

JSON representation
{
  "document": string,
  "uri": string,
  "title": string,
  "documentContexts": [
    {
      object (DocumentContext)
    }
  ],
  "extractiveSegments": [
    {
      object (ExtractiveSegment)
    }
  ],
  "extractiveAnswers": [
    {
      object (ExtractiveAnswer)
    }
  ]
}
Fields
document

string

Document resource name.

uri

string

URI for the document.

title

string

Title.

documentContexts[]

object (DocumentContext)

List of document contexts.

extractiveSegments[]

object (ExtractiveSegment)

List of extractive segments.

extractiveAnswers[]

object (ExtractiveAnswer)

List of extractive answers.

DocumentContext

Document context.

JSON representation
{
  "pageIdentifier": string,
  "content": string
}
Fields
pageIdentifier

string

Page identifier.

content

string

Document content.

ExtractiveSegment

Extractive segment. Guide

JSON representation
{
  "pageIdentifier": string,
  "content": string
}
Fields
pageIdentifier

string

Page identifier.

content

string

Extractive segment content.

ExtractiveAnswer

Extractive answer. Guide

JSON representation
{
  "pageIdentifier": string,
  "content": string
}
Fields
pageIdentifier

string

Page identifier.

content

string

Extractive answer content.

ChunkInfo

Chunk information.

JSON representation
{
  "chunk": string,
  "content": string
}
Fields
chunk

string

Chunk resource name.

content

string

Chunk textual content.