Type alias EnsureGeoIndexOptions

EnsureGeoIndexOptions: {
    fields: [string, string];
    geoJson?: false;
    inBackground?: boolean;
    legacyPolygons?: boolean;
    name?: string;
    type: "geo";
} | {
    fields: [string];
    geoJson?: boolean;
    inBackground?: boolean;
    legacyPolygons?: boolean;
    name?: string;
    type: "geo";
}

Options for creating a geo index.

Type declaration

  • fields: [string, string]

    Attribute paths for the document's latitude and longitude values.

  • Optional geoJson?: false

    If set to true, fields must be an array containing a single attribute path and the attribute value must be an array with two values, the first of which will be interpreted as the longitude and the second of which will be interpreted as the latitude of the document.

    Default: false

  • Optional inBackground?: boolean

    If set to true, the index will be created in the background to reduce the write-lock duration for the collection during index creation.

    Default: false

  • Optional legacyPolygons?: boolean

    If set to true, the index will use pre-3.10 rules for parsing GeoJSON polygons. This option is always implicitly true when using ArangoDB 3.9 or lower.

  • Optional name?: string

    A unique name for this index.

  • type: "geo"

Type declaration

  • fields: [string]

    An array containing the attribute path for an array containing two values, the first of which will be interpreted as the latitude, the second as the longitude. If geoJson is set to true, the order is reversed to match the GeoJSON format.

  • Optional geoJson?: boolean

    If set to true, fields must be an array containing a single attribute path and the attribute value must be an array with two values, the first of which will be interpreted as the longitude and the second of which will be interpreted as the latitude of the document.

    Default: false

  • Optional inBackground?: boolean

    If set to true, the index will be created in the background to reduce the write-lock duration for the collection during index creation.

    Default: false

  • Optional legacyPolygons?: boolean

    If set to true, the index will use pre-3.10 rules for parsing GeoJSON polygons. This option is always implicitly true when using ArangoDB 3.9 or lower.

  • Optional name?: string

    A unique name for this index.

  • type: "geo"