Skip to content

indexing/writer

Documentation

Overview

Classes

Writer

add()

Adds a new document entry to the specified index.

ts
static add(index: string, location: string, contents: string, lastModified: Date, parameters: any): void;
ParameterTypeDescription
indexstringThe name or identifier of the index (e.g., 'documents', 'users').
locationstringA unique identifier or path for the indexed document (e.g., a file path or URL).
contentsstringThe full-text content of the document to be indexed and made searchable.
lastModifiedDateThe Date object representing the last modification time of the document. Defaults to the current date/time if omitted.
parametersanyOptional key-value map of additional metadata to associate with the document.

Returns

  • Type: void
  • Description: