Type alias CreateTextAnalyzerOptions

CreateTextAnalyzerOptions: {
    features?: AnalyzerFeature[];
    properties: {
        accent?: boolean;
        case?: "lower" | "none" | "upper";
        edgeNgram?: {
            max?: number;
            min?: number;
            preserveOriginal?: boolean;
        };
        locale: string;
        stemming?: boolean;
        stopwords?: string[];
        stopwordsPath?: string;
    };
    type: "text";
}

Options for creating a Text Analyzer.

Type declaration

  • Optional features?: AnalyzerFeature[]

    Features to enable for this Analyzer.

  • properties: {
        accent?: boolean;
        case?: "lower" | "none" | "upper";
        edgeNgram?: {
            max?: number;
            min?: number;
            preserveOriginal?: boolean;
        };
        locale: string;
        stemming?: boolean;
        stopwords?: string[];
        stopwordsPath?: string;
    }

    Additional properties for the Analyzer.

    • 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.

  • type: "text"

    Type of the Analyzer.

Generated using TypeDoc