@resistdesign/voltra
    Preparing search index...

    Class StructuredInMemoryIndex

    In-memory structured index that builds term/contains/range postings.

    Index

    Methods

    • Add a document record to the index.

      Parameters

      • docId: DocId

        Document id to index.

      • record: Record<string, WhereValue | WhereValue[]>

        Structured field record for the document.

      Returns void

      Nothing.

    • Traverse every scalar value for a field in native value/doc-id order.

      Parameters

      • field: string

        Field name supplying the order.

      • options: StructuredQueryOptions = {}

        Optional paging and direction options.

      Returns CandidatePage

      Candidate page in global field order.

    • Run a between range query for a field.

      Parameters

      • field: string

        Field name to query.

      • lower: WhereValue

        Inclusive lower bound.

      • upper: WhereValue

        Inclusive upper bound.

      • options: StructuredQueryOptions = {}

        Optional paging options.

      Returns CandidatePage

      Candidate page of matching document ids.

    • Run a contains query for a field/value pair.

      Parameters

      • field: string

        Field name to query.

      • value: WhereValue

        Value to match.

      • options: StructuredQueryOptions = {}

        Optional paging options.

      Returns CandidatePage

      Candidate page of matching document ids.

    • Run an equality query for a field/value pair.

      Parameters

      • field: string

        Field name to query.

      • value: WhereValue

        Value to match.

      • options: StructuredQueryOptions = {}

        Optional paging options.

      Returns CandidatePage

      Candidate page of matching document ids.

    • Run a greater-than-or-equal range query for a field.

      Parameters

      • field: string

        Field name to query.

      • lower: WhereValue

        Inclusive lower bound.

      • options: StructuredQueryOptions = {}

        Optional paging options.

      Returns CandidatePage

      Candidate page of matching document ids.

    • Run a less-than-or-equal range query for a field.

      Parameters

      • field: string

        Field name to query.

      • upper: WhereValue

        Inclusive upper bound.

      • options: StructuredQueryOptions = {}

        Optional paging options.

      Returns CandidatePage

      Candidate page of matching document ids.