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>; includeAllFields?: undefined | false | true; storeValues?: "none" | "id"; trackListPositions?: undefined | false | true }

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 includeAllFields?: undefined | false | true

    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?: undefined | false | true

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

  • 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?: undefined | number; commitIntervalMsec?: undefined | number; consolidationIntervalMsec?: undefined | number; consolidationPolicy?: BytesAccumConsolidationPolicy | TierConsolidationPolicy; links?: Dict<ArangoSearchViewLink | undefined>; primarySort?: ({ direction: "desc" | "asc"; field: string } | { asc: boolean; field: string })[]; writebufferActive?: undefined | number; writebufferIdle?: undefined | number; writebufferSizeMax?: undefined | number }

Properties of an ArangoSearch View.

Type declaration

  • Optional cleanupIntervalStep?: undefined | number

    How many commits to wait between removing unused files.

    Default: 2

  • Optional commitIntervalMsec?: undefined | number

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

    Default: 1000

  • Optional consolidationIntervalMsec?: undefined | 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 writebufferActive?: undefined | number

    Maximum number of concurrent active writers that perform a transaction.

    Default: 0

  • Optional writebufferIdle?: undefined | number

    Maximum number of writers cached in the pool.

    Default: 64

  • Optional writebufferSizeMax?: undefined | number

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

    Default: 33554432, i.e. 32 MiB

BytesAccumConsolidationPolicy

BytesAccumConsolidationPolicy: { threshold?: undefined | 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?: undefined | number

    Must be in the range of 0.0 to 1.0.

  • type: "bytes_accum"

    Type of consolidation policy.

TierConsolidationPolicy

TierConsolidationPolicy: { minScore?: undefined | number; segmentsBytesFloor?: undefined | number; segmentsBytesMax?: undefined | number; segmentsMax?: undefined | number; segmentsMin?: undefined | 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?: undefined | number

    Minimum score.

  • Optional segmentsBytesFloor?: undefined | number

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

    Default: 2097152, i.e. 2 MiB

  • Optional segmentsBytesMax?: undefined | number

    Maximum allowed size of all consolidated segments.

    Default: 5368709120, i.e. 5 GiB

  • Optional segmentsMax?: undefined | number

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

    Default: 10

  • Optional segmentsMin?: undefined | 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
  • Indicates whether the given value represents a View.

    Parameters

    • view: any

      A value that might be a View.

    Returns view is View

Generated using TypeDoc