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.

AqlAnalyzer

AqlAnalyzer: { properties: AqlAnalyzerProperties; type: "aql" }

Analyzer type and type-specific properties for an AQL Analyzer

Type declaration

  • properties: AqlAnalyzerProperties

    Additional properties for the Analyzer.

  • type: "aql"

    Type of the Analyzer.

AqlAnalyzerProperties

AqlAnalyzerProperties: { batchSize?: undefined | number; collapsePositions?: undefined | false | true; keepNull?: undefined | false | true; memoryLimit?: undefined | number; queryString: string; returnType?: "string" | "number" | "bool" }

Properties of an AQL Analyzer.

Type declaration

  • Optional batchSize?: undefined | number

    Number between 1 and 1000 that determines the batch size for reading data from the query.

    Default: 1

  • Optional collapsePositions?: undefined | false | true

    If set to true, the position is set to 0 for all members of the query result array.

    Default: false

  • Optional keepNull?: undefined | false | true

    If set to false, null values will be discarded from the View index.

    Default: true

  • Optional memoryLimit?: undefined | number

    Memory limit for query execution in bytes.

    Default: 1048576 (1 MiB)

  • queryString: string

    AQL query to be executed.

  • Optional returnType?: "string" | "number" | "bool"

    Data type of the returned tokens.

    Default: "string"

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.

GeoJsonAnalyzer

GeoJsonAnalyzer: { properties: GeoJsonAnalyzerProperties; type: "geojson" }

Analyzer type and type-specific properties for a GeoJSON Analyzer

Type declaration

GeoJsonAnalyzerProperties

GeoJsonAnalyzerProperties: { options?: undefined | { maxCells?: undefined | number; maxLevel?: undefined | number; minLevel?: undefined | number }; type?: "shape" | "centroid" | "point" }

Properties of a GeoJSON Analyzer.

Type declaration

  • Optional options?: undefined | { maxCells?: undefined | number; maxLevel?: undefined | number; minLevel?: undefined | number }

    Options for fine-tuning geo queries.

    Default: { maxCells: 20, minLevel: 4, maxLevel: 23 }

  • Optional type?: "shape" | "centroid" | "point"

    If set to "centroid", only the centroid of the input geometry will be computed and indexed.

    If set to "point" only GeoJSON objects of type Point will be indexed and all other geometry types will be ignored.

    Default: "shape"

GeoPointAnalyzer

GeoPointAnalyzer: { properties: GeoPointAnalyzerProperties; type: "geopoint" }

Analyzer type and type-specific properties for a GeoPoint Analyzer

Type declaration

GeoPointAnalyzerProperties

GeoPointAnalyzerProperties: { latitude?: string[]; longitude?: string[]; options?: undefined | { maxLevel?: undefined | number; minCells?: undefined | number; minLevel?: undefined | number } }

Properties of a GeoPoint Analyzer.

Type declaration

  • Optional latitude?: string[]

    Attribute paths of the latitude value relative to the field for which the Analyzer is defined in the View.

  • Optional longitude?: string[]

    Attribute paths of the longitude value relative to the field for which the Analyzer is defined in the View.

  • Optional options?: undefined | { maxLevel?: undefined | number; minCells?: undefined | number; minLevel?: undefined | number }

    Options for fine-tuning geo queries.

    Default: { maxCells: 20, minLevel: 4, maxLevel: 23 }

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]

PipelineAnalyzer

PipelineAnalyzer: { properties: PipelineAnalyzerProperties; type: "pipeline" }

Analyzer type and type-specific properties for a Pipeline Analyzer

Type declaration

PipelineAnalyzerProperties

PipelineAnalyzerProperties: { pipeline: AnalyzerInfo[] }

Properties of a Pipeline Analyzer.

Type declaration

  • pipeline: AnalyzerInfo[]

    Definitions for Analyzers to chain in this Pipeline Analyzer.

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.

StopwordsAnalyzer

StopwordsAnalyzer: { properties: StopwordsAnalyzerProperties; type: "stopwords" }

Analyzer type and type-specific properties for a Stopwords Analyzer

Type declaration

StopwordsAnalyzerProperties

StopwordsAnalyzerProperties: { stopwords: string[] }

Properties of a Stopwords Analyzer.

Type declaration

  • stopwords: string[]

    Hex-encoded strings that describe the tokens to be discarded.

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"; edgeNgram?: undefined | { max?: undefined | number; min?: undefined | number; preserveOriginal?: undefined | false | true }; 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"

  • Optional edgeNgram?: undefined | { max?: undefined | number; min?: undefined | number; preserveOriginal?: undefined | false | true }

    If present, then edge n-grams are generated for each token (word).

  • 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