Options
All
  • Public
  • Public/Protected
  • All
Menu

Module view

import type { ArangoSearchView } from "arangojs/view";

The "view" module provides View related types and interfaces for TypeScript.

Index

Type aliases

ArangoSearchViewLink

ArangoSearchViewLink: { analyzers?: string[]; fields?: Dict<ArangoSearchViewLink | undefined>; inBackground?: boolean; includeAllFields?: boolean; storeValues?: "none" | "id"; trackListPositions?: boolean }

A link definition for an ArangoSearch View.

Type declaration

  • Optional analyzers?: string[]

    A list of names of Analyzers to apply to values of processed document attributes.

    Default: ["identity"]

  • Optional fields?: Dict<ArangoSearchViewLink | undefined>

    An object mapping names of attributes to process for each document to ArangoSearchViewLink definitions.

  • Optional inBackground?: boolean

    If set to true, then no exclusive lock is used on the source collection during View index creation, so that it remains basically available.

    Default: false

  • Optional includeAllFields?: boolean

    If set to true, all document attributes will be processed, otherwise only the attributes in fields will be processed.

    Default: false

  • Optional storeValues?: "none" | "id"

    Controls how the view should keep track of the attribute values.

    Default: "none"

  • Optional trackListPositions?: boolean

    If set to true, the position of values in array values will be tracked, otherwise all values in an array will be treated as equal alternatives.

ArangoSearchViewProperties

ArangoSearchViewProperties: { cleanupIntervalStep: number; consolidationIntervalMsec: number; consolidationPolicy: BytesAccumConsolidationPolicy | TierConsolidationPolicy; links: Dict<ArangoSearchViewLink | undefined>; primarySort: { direction: "desc" | "asc"; field: string }[]; primarySortCompression: PrimarySortCompression; storedValues: { fields: string[] }[]; writebufferActive: number; writebufferIdle: number; writebufferSizeMax: number }

Properties of an ArangoSearch View.

Type declaration

  • cleanupIntervalStep: number

    How many commits to wait between removing unused files.

  • consolidationIntervalMsec: number

    How long to wait between applying the consolidationPolicy.

  • consolidationPolicy: BytesAccumConsolidationPolicy | TierConsolidationPolicy

    Consolidation policy to apply for selecting which segments should be merged.

  • links: Dict<ArangoSearchViewLink | undefined>

    An object mapping names of linked collections to ArangoSearchViewLink definitions.

  • primarySort: { direction: "desc" | "asc"; field: string }[]

    Attribute path (field) for the value of each document that is used for sorting.

  • primarySortCompression: PrimarySortCompression

    Compression to use for the primary sort data.

    Default: "lz4"

  • storedValues: { fields: string[] }[]

    Attribute paths for which values should be stored in the view index in addition to those used for sorting via primarySort.

  • writebufferActive: number

    Maximum number of concurrent active writers that perform a transaction.

  • writebufferIdle: number

    Maximum number of writers cached in the pool.

  • writebufferSizeMax: number

    Maximum memory byte size per writer before a writer flush is triggered.

ArangoSearchViewPropertiesOptions

ArangoSearchViewPropertiesOptions: { cleanupIntervalStep?: number; commitIntervalMsec?: number; consolidationIntervalMsec?: number; consolidationPolicy?: BytesAccumConsolidationPolicy | TierConsolidationPolicy; links?: Dict<ArangoSearchViewLink | undefined>; primarySort?: ({ direction: "desc" | "asc"; field: string } | { asc: boolean; field: string })[]; primarySortCompression?: PrimarySortCompression; storedValues?: { fields: string[] }[]; writebufferActive?: number; writebufferIdle?: number; writebufferSizeMax?: number }

Properties of an ArangoSearch View.

Type declaration

  • Optional cleanupIntervalStep?: number

    How many commits to wait between removing unused files.

    Default: 2

  • Optional commitIntervalMsec?: number

    How long to wait between commiting View data store changes and making documents visible to queries.

    Default: 1000

  • Optional consolidationIntervalMsec?: number

    How long to wait between applying the consolidationPolicy.

    Default: 10000

  • Optional consolidationPolicy?: BytesAccumConsolidationPolicy | TierConsolidationPolicy

    Consolidation policy to apply for selecting which segments should be merged.

  • Optional links?: Dict<ArangoSearchViewLink | undefined>

    An object mapping names of linked collections to ArangoSearchViewLink definitions.

  • Optional primarySort?: ({ direction: "desc" | "asc"; field: string } | { asc: boolean; field: string })[]

    Attribute path (field) for the value of each document that will be used for sorting.

    If direction is set to "asc" or asc is set to true, the primary sorting order will be ascending.

    If direction is set to "desc" or asc is set to false, the primary sorting order will be descending.

  • Optional primarySortCompression?: PrimarySortCompression

    Compression to use for the primary sort data.

    Default: "lz4"

  • Optional storedValues?: { fields: string[] }[]

    Attribute paths for which values should be stored in the view index in addition to those used for sorting via primarySort.

  • Optional writebufferActive?: number

    Maximum number of concurrent active writers that perform a transaction.

    Default: 0

  • Optional writebufferIdle?: number

    Maximum number of writers cached in the pool.

    Default: 64

  • Optional writebufferSizeMax?: number

    Maximum memory byte size per writer before a writer flush is triggered.

    Default: 33554432, i.e. 32 MiB

BytesAccumConsolidationPolicy

BytesAccumConsolidationPolicy: { threshold?: number; type: "bytes_accum" }

Policy to consolidate based on segment byte size and live document count as dictated by the customization attributes.

Type declaration

  • Optional threshold?: number

    Must be in the range of 0.0 to 1.0.

  • type: "bytes_accum"

    Type of consolidation policy.

PrimarySortCompression

PrimarySortCompression: "lz4" | "none"

Compression to use for primary sort data of a View.

Default: "lz4"

TierConsolidationPolicy

TierConsolidationPolicy: { minScore?: number; segmentsBytesFloor?: number; segmentsBytesMax?: number; segmentsMax?: number; segmentsMin?: number; type: "tier" }

Policy to consolidate if the sum of all candidate segment byte size is less than the total segment byte size multiplied by a given threshold.

Type declaration

  • Optional minScore?: number

    Minimum score.

  • Optional segmentsBytesFloor?: number

    Defines the value to treat all smaller segments as equal for consolidation selection.

    Default: 2097152, i.e. 2 MiB

  • Optional segmentsBytesMax?: number

    Maximum allowed size of all consolidated segments.

    Default: 5368709120, i.e. 5 GiB

  • Optional segmentsMax?: number

    Maximum number of segments that will be evaluated as candidates for consolidation.

    Default: 10

  • Optional segmentsMin?: number

    Minimum number of segments that will be evaluated as candidates for consolidation.

    Default: 1

  • type: "tier"

    Type of consolidation policy.

ViewDescription

ViewDescription: { globallyUniqueId: string; id: string; name: string; type: ViewType }

Generic description of a View.

Type declaration

  • globallyUniqueId: string

    A globally unique identifier for this View.

  • id: string

    An identifier for this View.

  • name: string

    Name of the View.

  • type: ViewType

    Type of the View.

Functions

isArangoView

  • isArangoView(view: any): view is View<any, any>
  • Indicates whether the given value represents a View.

    Parameters

    • view: any

      A value that might be a View.

    Returns view is View<any, any>

Generated using TypeDoc