Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FTSearchParameters

The parameter of the 'FT.SEARCH' command

Hierarchy

  • FTSearchParameters

Index

Properties

dialect?: string

Choose the dialect version to execute the query under. If not specified, the query will execute under the default dialect version set during module initial loading or via FT.CONFIG SET command.

expander?: string

The 'EXPANDER' parameter. If set, we will use a custom query expander instead of the stemmer.

explainScore?: boolean

The 'EXPLAINSCORE' parameter. If set, will return a textual description of how the scores were calculated.

filter?: { field: string; max: number; min: number }[]

The 'FILTER' parameter. If set, and numeric_field is defined as a numeric field in FT.CREATE, we will limit results to those having numeric values ranging between min and max. min and max follow ZRANGE syntax, and can be -inf , +inf and use ( for exclusive ranges.

geoFilter?: { field: string; lat: number; lon: number; measurement: "m" | "km" | "mi" | "ft"; radius: number }

The 'GEOFILTER' parameter. If set, we filter the results to a given radius from lon and lat. Radius is given as a number and units.

Type declaration

  • field: string

    The field of the 'GEOFILTER' parameter

  • lat: number

    The lat argument of the 'GEOFILTER' parameter

  • lon: number

    The lon argument of the 'GEOFILTER' parameter

  • measurement: "m" | "km" | "mi" | "ft"

    The measurement argument of the 'GEOFILTER' parameter

  • radius: number

    The radius argument of the 'GEOFILTER' parameter

highlight?: { fields?: { fields: string | string[]; num?: number }; tags?: { close: string; open: string } }

The 'HIGHLIGHT' parameter. Use this option to format occurrences of matched text.

Type declaration

  • Optional fields?: { fields: string | string[]; num?: number }

    The fields argument of the 'HIGHLIGHT' parameter

    • fields: string | string[]
    • Optional num?: number
  • Optional tags?: { close: string; open: string }

    The tags argument of the 'HIGHLIGHT' parameter

    • close: string

      The close argument of the tags argument

    • open: string

      The open argument of the tags argument

inFields?: { fields?: string | string[]; num?: number }

The 'INFIELDS' parameter. If set, filter the results to ones appearing only in specific fields of the document, like title or URL.

Type declaration

  • Optional fields?: string | string[]
  • Optional num?: number
inKeys?: { keys?: string | string[]; num?: number }

The 'INKEYS' parameter. If set, we limit the result to a given set of keys specified in the list. the first argument must be the length of the list, and greater than zero.

Type declaration

  • Optional keys?: string | string[]
  • Optional num?: number
inOrder?: boolean

The 'INORDER' parameter. If set, and usually used in conjunction with SLOP, we make sure the query terms appear in the same order in the document as in the query, regardless of the offsets between them.

language?: string

The 'LANGUAGE' parameter. If set, we use a stemmer for the supplied language during search for query expansion.

limit?: { first: number; num: number }

The 'LIMIT' parameter. If the parameters appear after the query, we limit the results to the offset and number of results given.

Type declaration

  • first: number

    The first argument of the 'LIMIT' parameter

  • num: number

    The num argument of the 'LIMIT' parameter

noContent?: boolean

The 'NOTCONTENT' parameter. If it appears after the query, we only return the document ids and not the content.

noStopWords?: boolean

The 'noStopWords' parameter. If set, we do not filter stopwords from the query.

payload?: string

The 'PAYLOAD' parameter. Add an arbitrary, binary safe payload that will be exposed to custom scoring functions.

return?: { fields: { as?: string; field: string }[]; num?: number }

The 'RETURN' parameter. Use this keyword to limit which fields from the document are returned.

Type declaration

  • fields: { as?: string; field: string }[]
  • Optional num?: number
scorer?: string

The 'SCORER' parameter. If set, we will use a custom scoring function defined by the user.

slop?: number

The 'SLOP' parameter. If set, we allow a maximum of N intervening number of unmatched offsets between phrase terms.

sortBy?: { field: string; sort: FTSort }

The 'SORTBY' parameter. If specified, the results are ordered by the value of this field. This applies to both text and numeric fields.

Type declaration

  • field: string

    The field argument of the 'SORTBY' parameter

  • sort: FTSort

    The sort argument of the 'SORTBY' parameter

summarize?: { fields?: { fields: string | string[]; num?: number }; frags?: number; len?: number; separator?: string }

The 'SUMMARIZE' parameter. Use this option to return only the sections of the field which contain the matched text.

Type declaration

  • Optional fields?: { fields: string | string[]; num?: number }

    The fields argument of the 'SUMMARIZE' parameter

    • fields: string | string[]
    • Optional num?: number
  • Optional frags?: number

    The fargs argument of the 'SUMMARIZE' parameter

  • Optional len?: number

    The len argument of the 'SUMMARIZE' parameter

  • Optional separator?: string

    The separator argument of the 'SUMMARIZE' parameter

verbatim?: boolean

The 'VERBATIM' parameter. if set, we do not try to use stemming for query expansion but search the query terms verbatim.

withPayloads?: boolean

The 'WITHPAYLOADS' parameter. If set, we retrieve optional document payloads (see FT.ADD).

withScores?: boolean

The 'WITHSCORES' parameter. If set, we also return the relative internal score of each document.

withSortKeys?: boolean

The 'WITHSORTKEYS' parameter. Only relevant in conjunction with SORTBY . Returns the value of the sorting key, right after the id and score and /or payload if requested.

Generated using TypeDoc