CipherStash Documentation


DynamicMatch supports full text search on string fields when the fields are not known ahead of time.

Supported Types

Index Definition

DynamicMatch works just like Match except that it automatically indexes all strings fields that it finds within a document - even when the documents in a collection do not have a consistent structure.

DynamicMatch indexes can be defined with the "dynamic-match" kind in a JSON schema definition:

  // (type definition omitted)
  "indexes": {
    "allText": {
      "kind": "dynamic-match",
      "tokenFilters": [{ "kind": "downcase" }],
      "tokenizer": { "kind": "ngram", "tokenLength": 3 }

Supported Query Operations

  • match (performs full text search)

StashJS (TypeScript)

let queryResult1 = await employees.all(
  employee => employee.allText.match("CEO")