Oihana PHP Arango

AnalyzerFeature uses ConstantsTrait

ArangoSearch analyzer features, used as entries of the `features` array on `POST /_api/analyzer` (and as the per-field `features` array on inverted indexes / arangosearch views).

Features determine which metadata the indexer keeps alongside each indexed token — and therefore which AQL SEARCH operators are available against the analyzed field:

  • self::FREQUENCY is required by BM25() / TFIDF() scoring,
  • self::NORM is required by BM25() length normalisation,
  • self::POSITION is required by PHRASE(),
  • self::OFFSET is required by snippet highlighting and is only meaningful when self::POSITION is also enabled.
Tags
see
https://docs.arangodb.com/stable/index-and-search/analyzers/#analyzer-features
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Constants

FREQUENCY  : string = 'frequency'
Keeps the token frequency per field. Required by `BM25()` and `TFIDF()` scoring functions.
NORM  : string = 'norm'
Keeps the document length norm per field. Required by `BM25()` length normalisation.
OFFSET  : string = 'offset'
Keeps the byte offset of each token within the source field.
POSITION  : string = 'position'
Keeps the ordinal position of each token within the source field. Required by `PHRASE()`.

Constants

FREQUENCY

Keeps the token frequency per field. Required by `BM25()` and `TFIDF()` scoring functions.

public string FREQUENCY = 'frequency'

NORM

Keeps the document length norm per field. Required by `BM25()` length normalisation.

public string NORM = 'norm'

OFFSET

Keeps the byte offset of each token within the source field.

public string OFFSET = 'offset'

Required by highlighting / snippet extraction. Implies self::POSITION.

POSITION

Keeps the ordinal position of each token within the source field. Required by `PHRASE()`.

public string POSITION = 'position'
On this page

Search results