Skip to content

Support facet.threads so multi-field facet requests parallelize #3

Description

@njakobsen

Solr computes a request's field facets sequentially unless facet.threads is set. A request faceting many fields pays the sum of the per-field scans: Connect's search autocomplete facets one field per searchable facet — over twenty on its referral search — and measured on a 224,000-document core, facet.threads=8 took that request from 53ms to 13ms with no measured case slower. Threads beyond 8 measured no further gain there.

Sunspot has no way to send it, so Connect Engine currently injects it by monkey patch. The parameter is request-global in Solr (not per-field), so it fits as a search-level option rather than a facet option — e.g. on the search DSL or session configuration — with the docs noting it shares Solr's own thread pool.

🤖 Generated with Claude Code

https://claude.ai/code/session_0162sTEdS4eZUe2oi2JioByV

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions