Skip to content

SearchQuery

Configuration for a search query. Defines the query string and vector weights. This is the model that will be sent by end users to the search API endpoint.

Properties

Name Type
query string
vector_weights Array<VectorSearchWeight>
custom_vectors Array<CustomVector>
limit number
score_threshold number
document_tags Array<string>
document_tags_match_all boolean
metadata_filter MetadataFilter
raw_scores boolean

Example

import type { SearchQuery } from ''

// TODO: Update the object below with actual values
const example = {
  "query": null,
  "vector_weights": null,
  "custom_vectors": null,
  "limit": null,
  "score_threshold": null,
  "document_tags": null,
  "document_tags_match_all": null,
  "metadata_filter": null,
  "raw_scores": null,
} satisfies SearchQuery

console.log(example)

// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)

// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as SearchQuery
console.log(exampleParsed)

[Back to top] [Back to API list] [Back to Model list] [Back to README]