Document compressor that uses a pipeline of Transformers.

Hierarchy

Constructors

Properties

transformers: (BaseDocumentTransformer<Document<Record<string, any>>[], Document<Record<string, any>>[]> | BaseDocumentCompressor)[]

Methods

  • Abstract method that must be implemented by any class that extends BaseDocumentCompressor. This method takes an array of Document objects and a query string as parameters and returns a Promise that resolves with an array of compressed Document objects.

    Parameters

    • documents: Document<Record<string, any>>[]

      An array of Document objects to be compressed.

    • query: string

      A query string.

    • Optional callbacks: Callbacks

    Returns Promise<Document<Record<string, any>>[]>

    A Promise that resolves with an array of compressed Document objects.

Generated using TypeDoc