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?: number; collapsePositions?: boolean; keepNull?: boolean; memoryLimit?: number; queryString: string; returnType?: "string" | "number" | "bool" }

Properties of an AQL Analyzer.

Type declaration

  • Optional batchSize?: number

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

    Default: 1

  • Optional collapsePositions?: boolean

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

    Default: false

  • Optional keepNull?: boolean

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

    Default: true

  • Optional memoryLimit?: 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"

CollationAnalyzer

CollationAnalyzer: { properties: CollationAnalyzerProperties; type: "collation" }

Analyzer type and type-specific properties for a Collation Analyzer

Type declaration

CollationAnalyzerProperties

CollationAnalyzerProperties: { locale: string }

Properties of a Collation Analyzer.

Type declaration

  • locale: string

    Text locale.

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

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?: { maxCells?: number; maxLevel?: number; minLevel?: number }; type?: "shape" | "centroid" | "point" }

Properties of a GeoJSON Analyzer.

Type declaration

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

    Options for fine-tuning geo queries.

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

    • Optional maxCells?: number
    • Optional maxLevel?: number
    • Optional minLevel?: number
  • 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?: { maxLevel?: number; minCells?: number; minLevel?: 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?: { maxLevel?: number; minCells?: number; minLevel?: number }

    Options for fine-tuning geo queries.

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

    • Optional maxLevel?: number
    • Optional minCells?: number
    • Optional minLevel?: number

IdentityAnalyzerInfo

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

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

Type declaration

  • Optional properties?: 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?: boolean; case?: "lower" | "none" | "upper"; locale: string }

Properties of a Norm Analyzer.

Type declaration

  • Optional accent?: boolean

    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.

SegmentationAnalyzer

SegmentationAnalyzer: { properties: SegmentationAnalyzerProperties; type: "segmentation" }

Analyzer type and type-specific properties for a Segmentation Analyzer

Type declaration

SegmentationAnalyzerProperties

SegmentationAnalyzerProperties: { break?: "all" | "alpha" | "graphic"; case?: "lower" | "upper" | "none" }

Properties of a Segmentation Analyzer.

Type declaration

  • Optional break?: "all" | "alpha" | "graphic"

    Which tokens should be returned.

    Default: "alpha"

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

    What case all returned tokens should be converted to if applicable.

    Default: "none"

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: { hex?: boolean; stopwords: string[] }

Properties of a Stopwords Analyzer.

Type declaration

  • Optional hex?: boolean

    Whether stopword values should be interpreted as hex-encoded strings.

    Default: false

  • stopwords: string[]

    Array of 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?: boolean; case?: "lower" | "none" | "upper"; edgeNgram?: { max?: number; min?: number; preserveOriginal?: boolean }; locale: string; stemming?: boolean; stopwords?: string[]; stopwordsPath?: string }

Properties of a Text Analyzer.

Type declaration

  • Optional accent?: boolean

    Preserve accents in returned words.

    Default: false

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

    Case conversion.

    Default: "lower"

  • Optional edgeNgram?: { max?: number; min?: number; preserveOriginal?: boolean }

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

    • Optional max?: number
    • Optional min?: number
    • Optional preserveOriginal?: boolean
  • locale: string

    Text locale.

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

  • Optional stemming?: boolean

    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?: 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