Interface QueryOptions

Hierarchy

  • QueryOptions

Properties

bm25: {
    b: number;
    k1: number;
}

Object for specifying custom BM25 parameters.

Type declaration

  • b: number

    The k1 value.

    Default Value

    0.75

  • k1: number

    The b value.

    Default Value

    1.2

filter?: {
    [field: string]: any;
}

Filters to exclude/include specific documents based on fields that are not of type 'text'.

Type declaration

  • [field: string]: any
getDocument?: ((documentId: string) => null | Promise<null | {
    [key: string]: any;
}>)

Type declaration

    • (documentId: string): null | Promise<null | {
          [key: string]: any;
      }>
    • Parameters

      • documentId: string

      Returns null | Promise<null | {
          [key: string]: any;
      }>

offset: number

The number of hits to skip before returning, e.g. for doing pagination.

queryFields?: string[] | {
    [field: string]: QueryField;
}

A list of text fields to use for searching or an object specifying more specific options for each field using the QueryField options.

size: number

The number of hits to return.

synonyms?: {
    [token: string]: string[];
}

A mapping of synonyms of analyzed tokens.

Type declaration

  • [token: string]: string[]