Skip to content

indexing/searcher

Documentation

Overview

Classes

Searcher

Executes a keyword search against a specified index.

ts
static search(index: string, term: string): void;
ParameterTypeDescription
indexstringThe name or identifier of the index to search (e.g., 'documents', 'products').
termstringThe keyword or search phrase to look for.

Returns

  • Type: void
  • Description: An array of result objects, parsed from the native JSON string output.

before()

Finds all entries in the index that were indexed before the specified date.

ts
static before(index: string, date: Date): void;
ParameterTypeDescription
indexstringThe name or identifier of the index.
dateDateThe Date object representing the upper bound (exclusive) of the time range.

Returns

  • Type: void
  • Description: An array of result objects, parsed from the native JSON string output.

after()

Finds all entries in the index that were indexed after the specified date.

ts
static after(index: string, date: Date): void;
ParameterTypeDescription
indexstringThe name or identifier of the index.
dateDateThe Date object representing the lower bound (exclusive) of the time range.

Returns

  • Type: void
  • Description: An array of result objects, parsed from the native JSON string output.

between()

Finds all entries in the index that were indexed within the specified date range.

ts
static between(index: string, lower: Date, upper: Date): void;
ParameterTypeDescription
indexstringThe name or identifier of the index.
lowerDateThe Date object for the lower bound (exclusive).
upperDateThe Date object for the upper bound (exclusive).

Returns

  • Type: void
  • Description: An array of result objects, parsed from the native JSON string output.