Fulltext queries

    ArangoDB allows to run queries on text contained in document attributes. To usethis, a fulltext index must be defined for the attribute of the collection thatcontains the text. Creating the index will parse the text in the specifiedattribute for all documents of the collection. Only documents will be indexedthat contain a textual value in the indexed attribute. For such documents, thetext value will be parsed, and the individual words will be inserted into thefulltext index.

    When a fulltext index exists, it can be queried using a fulltext query.

    queries the fulltext index

    The fulltext simple query functions performs a fulltext search on the specifiedattribute and the specified query.

    Note: the fulltext simple query function is deprecated as of ArangoDB 2.6. The function may be removed in future versions of ArangoDB. The preferredway for executing fulltext queries is to use an AQL query using the FULLTEXT as follows:

    Examples

    Show execution results

    Hide execution results

    Syntax

    • +: logical AND (intersection)
    • : negation (exclusion)Examples:

    • "banana": searches for documents containing “banana”

    • "banana,apple": searches for documents containing both “banana” AND “apple”
    • "banana,-apple": searches for documents that contains “banana” but NOT “apple”.Logical operators are evaluated from left to right.

    Each search word can optionally be prefixed with complete: or prefix:, withcomplete: being the default. This allows searching for complete words or forword prefixes. Suffix searches or any other forms are partial-word matching arecurrently not supported.

    Examples:

    • "complete:banana": searches for documents containing the exact word “banana”
    • : searches for documents with words that start with prefix “head”

    Especially no word normalization, stemming, or similarity analysis will beperformed when indexing or searching. If any of these features is required, itis suggested that the user does the text normalization on the client side, andprovides for each document an extra attribute containing just a comma-separatedlist of normalized words. This attribute can then be indexed with a fulltextindex, and the user can send fulltext queries for this index, with the fulltextqueries also containing the stemmed or normalized versions of words as requiredby the user.