Pinecone · Schema

SearchMatchTerms

Specifies which terms must be present in the text of each search hit based on the specified strategy. The match is performed against the text field specified in the integrated index `field_map` configuration. Terms are normalized and tokenized into single tokens before matching, and order does not matter. Example: `"match_terms": {"terms": ["animal", "CHARACTER", "donald Duck"], "strategy": "all"}` will tokenize to `["animal", "character", "donald", "duck"]`, and would match `"Donald F. Duck is a funny animal character"` but would not match `"A duck is a funny animal"`. Match terms filtering is supported only for sparse indexes with [integrated embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding) configured to use the [pinecone-sparse-english-v0](https://docs.pinecone.io/models/pinecone-sparse-english-v0) model.

Vector DatabasesAIEmbeddingsRAG

Properties

Name Type Description
strategy string The strategy for matching terms in the text. Currently, only `all` is supported, which means all specified terms must be present.
terms array A list of terms that must be present in the text of each search hit based on the specified strategy.
View JSON Schema on GitHub

JSON Schema

pinecone-searchmatchterms-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SearchMatchTerms",
  "title": "SearchMatchTerms",
  "example": {
    "strategy": "all",
    "terms": [
      "animal",
      "CHARACTER",
      "donald Duck"
    ]
  },
  "description": "Specifies which terms must be present in the text of each search hit based on the specified strategy. The match is performed\nagainst the text field specified in the integrated index `field_map` configuration.\n\nTerms are normalized and tokenized into single tokens before matching, and order does not matter.\n\nExample:\n\n  `\"match_terms\": {\"terms\": [\"animal\", \"CHARACTER\", \"donald Duck\"], \"strategy\": \"all\"}` will tokenize\n  to `[\"animal\", \"character\", \"donald\", \"duck\"]`, and would match\n  `\"Donald F. Duck is a funny animal character\"` but would not match `\"A duck is a funny animal\"`.\n\nMatch terms filtering is supported only for sparse indexes with [integrated embedding](https://docs.pinecone.io/guides/index-data/indexing-overview#vector-embedding)\nconfigured to use the [pinecone-sparse-english-v0](https://docs.pinecone.io/models/pinecone-sparse-english-v0) model.",
  "type": "object",
  "properties": {
    "strategy": {
      "description": "The strategy for matching terms in the text. Currently, only `all` is supported, which means all specified terms must be present.",
      "x-enum": [
        "all"
      ],
      "type": "string"
    },
    "terms": {
      "description": "A list of terms that must be present in the text of each search hit based on the specified strategy.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}