Menu

Query Engine Configuration

There are a number of different defaults that can be overridden within the Crux query engine.

  • JSON

  • Clojure

  • EDN

{
  "crux/query-engine": {
    "fn-allow-list": ["foo/bar"]
  }
}
{:crux/query-engine {:fn-allow-list '[foo/bar]}}
{:crux/query-engine {:fn-allow-list [foo/bar]}

Parameters

  • entity-cache-size (int, default 32768): query entity cache size.

  • query-timeout (int, default 30000): query timeout in milliseconds.

  • batch-size (int, default 100): batch size of results.

  • fn-allow-list (Predicate Allowlist, default nil): list of allowed namespaces/functions in predicate functions.

Predicate Allowlist

By default, users can invoke any predicate function in their queries. To restrict what functions a user can invoke, you can specify a :fn-allow-list of safe functions/namespaces. We include a set of pure functions from clojure.core, for convenience.

Allowlists can be a list of the following:

  • Unqualified symbols/strings, for example, clojure.set. These are assumed to be namespaces, and all functions within that namespace are allowed.

  • Fully qualified symbols/strings, for example, clojure.string/capitalize. These are assumed to be a permitted function.