Enable multi-threaded faceting

Enabling multi-threaded faceting can provide better performance for field faceting.

  • When multi-threaded faceting is enabled, field faceting tasks are completed in parallel with a thread working on every field faceting task simultaneously. Performance improvements do not occur in all cases, but improvements are likely when all of the following are true:
    • The system uses highly concurrent hardware.
    • Faceting operations apply to large data sets over multiple fields.
    • There is not an unusually high number of queries occurring simultaneously on the system. Systems that are lightly loaded or that are mainly engaged with ingestion and indexing may be helped by multi-threaded faceting; for example, a system ingesting articles and being queried by a researcher. Systems heavily loaded by user queries are less likely to be helped by multi-threaded faceting; for example, an e-commerce site with heavy user-traffic.
To enable multi-threaded faceting, add facet-threads to queries.

If facet-threads is omitted or set to 0, faceting is single-threaded. If facet-threads is set to a negative value, such as -1, multi-threaded faceting will use as many threads as there are fields to facet up to the maximum number of threads possible on the system.

For example, to use up to 1000 threads, use a similar query: