Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "analyzer"

import type { Analyzer } from "arangojs/analyzer";

The "analyzer" module provides analyzer related types and interfaces for TypeScript.

Index

Type aliases

AnalyzerDescription

AnalyzerDescription: AnalyzerInfo & { features: AnalyzerFeature[]; name: string }

An object describing an Analyzer.

AnalyzerFeature

AnalyzerFeature: "frequency" | "norm" | "position"

Name of a feature enabled for an Analyzer.

AnalyzerInfo

Analyzer type and its type-specific properties.

CreateAnalyzerOptions

CreateAnalyzerOptions: AnalyzerInfo & { features?: AnalyzerFeature[] }

Options for creating an Analyzer.

DelimiterAnalyzerInfo

DelimiterAnalyzerInfo: { properties: string | { delimiter: string }; type: "delimiter" }

Analyzer type and type-specific properties for a Delimiter Analyzer.

Type declaration

  • properties: string | { delimiter: string }

    Additional properties for the Analyzer.

    The value will be used as delimiter to split text into tokens as specified in RFC 4180, without starting new records on newlines.

  • type: "delimiter"

    Type of the Analyzer.

IdentityAnalyzerInfo

IdentityAnalyzerInfo: { properties?: undefined | null; type: "identity" }

Analyzer type and type-specific properties for an Identity Analyzer.

Type declaration

  • Optional properties?: undefined | null

    Additional properties for the Analyzer.

    The identity Analyzer does not take additional properties.

  • type: "identity"

    Type of the Analyzer.

NgramAnalyzerInfo

NgramAnalyzerInfo: { properties: NgramAnalyzerProperties; type: "ngram" }

Analyzer type and type-specific properties for an Ngram Analyzer.

Type declaration

NgramAnalyzerProperties

NgramAnalyzerProperties: { max: number; min: number; preserveOriginal: boolean }

Properties of an Ngram Analyzer.

Type declaration

  • max: number

    Maximum n-gram length.

  • min: number

    Minimum n-gram length.

  • preserveOriginal: boolean

    Output the original value as well.

NormAnalyzerInfo

NormAnalyzerInfo: { properties: NormAnalyzerProperties; type: "norm" }

Analyzer type and type-specific properties for a Norm Analyzer.

Type declaration

  • properties: NormAnalyzerProperties

    Additional properties for the Analyzer.

  • type: "norm"

    Type of the Analyzer.

NormAnalyzerProperties

NormAnalyzerProperties: { accent?: undefined | false | true; case?: "lower" | "none" | "upper"; locale: string }

Properties of a Norm Analyzer.

Type declaration

  • Optional accent?: undefined | false | true

    Preserve accents in returned words.

    Default: false

  • Optional case?: "lower" | "none" | "upper"

    Case conversion.

    Default: "lower"

  • locale: string

    Text locale.

    Format: language[_COUNTRY][.encoding][@variant]

StemAnalyzerInfo

StemAnalyzerInfo: { properties: { locale: string }; type: "stem" }

Analyzer type and type-specific properties for a Stem Analyzer.

Type declaration

  • properties: { locale: string }

    Additional properties for the Analyzer.

    The value defines the text locale.

    Format: language[_COUNTRY][.encoding][@variant]

    • locale: string
  • type: "stem"

    Type of the Analyzer.

TextAnalyzerInfo

TextAnalyzerInfo: { properties: TextAnalyzerProperties; type: "text" }

Analyzer type and type-specific properties for a Text Analyzer.

Type declaration

  • properties: TextAnalyzerProperties

    Additional properties for the Analyzer.

  • type: "text"

    Type of the Analyzer.

TextAnalyzerProperties

TextAnalyzerProperties: { accent?: undefined | false | true; case?: "lower" | "none" | "upper"; locale: string; stemming?: undefined | false | true; stopwords?: string[]; stopwordsPath?: undefined | string }

Properties of a Text Analyzer.

Type declaration

  • Optional accent?: undefined | false | true

    Preserve accents in returned words.

    Default: false

  • Optional case?: "lower" | "none" | "upper"

    Case conversion.

    Default: "lower"

  • locale: string

    Text locale.

    Format: language[_COUNTRY][.encoding][@variant]

  • Optional stemming?: undefined | false | true

    Apply stemming on returned words.

    Default: true

  • Optional stopwords?: string[]

    Words to omit from result.

    Defaults to the words loaded from the file at stopwordsPath.

  • Optional stopwordsPath?: undefined | string

    Path with a language sub-directory containing files with words to omit.

    Defaults to the path specified in the server-side environment variable IRESEARCH_TEXT_STOPWORD_PATH or the current working directory of the ArangoDB process.

Functions

isArangoAnalyzer

  • isArangoAnalyzer(analyzer: any): analyzer is Analyzer
  • Indicates whether the given value represents an Analyzer.

    Parameters

    • analyzer: any

      A value that might be an Analyzer.

    Returns analyzer is Analyzer

Generated using TypeDoc