Set ArangoDB to be case insensitive

41 Views Asked by At

I want to know if there is a way to set the entire database, or at least the collections, to be case insensitive without having to use lower() or upper() in the queries.

2

There are 2 best solutions below

1
darkheir On

This is not currently possible to have a full collection to be case insensitive.

You could create a view that will index you collection and specify a default analyzer that will ignore the case.

See:

0
Shahar Shokrani On

You you are worrying about query-time performance you could you injection-time approach like:

LET doc = {
    originalText: "Some Text",
    searchText: LOWER("Some Text")
}

INSERT doc INTO yourCollection

The AQL:

FOR doc IN yourCollection
    FILTER doc.searchText == LOWER("your search term")
    RETURN doc