Solr Facet Performance
These benchmarks compare the performance of the new JSON Facet API with it’s “performance-first” architecture, and the existing (legacy) Solr Facets.
Test index details:
documents: 5M index segments: 25 index size: 1.74GB 6 single valued string fields with 10, 100, 1000, 10000, 100000, 1000000 unique values respectively. 6 single valued integer fields as above. 6 multi-valued string fields with 1-5 values per field, with 10, 100, 1000, 10000, 100000, 1000000 unique values respectively. 6 multi-valued integer fields as above. 5% chance of any given field having no values for a particular document.
Test requests details:
Base test query and filters (the domain) matches 2,161,827 documents. Single client thread (and both requests only use a single internal thread per request). Single warm-up run per implementation that is discarded. Multiple runs across all fields, with fastest time being taken for each field.
Faceting + Average performance
These benchmarks test faceting on one field and finding the average value in another field per facet bucket.
JSON Facet API command:
json.facet={ f:{ type : terms, field : m100_5_ss, facet : { mean : "avg(s10_s)" } } }
Legacy Facet command:
facet=true& stats=true& stats.field={!tag=stat1+mean=true}s10_s& facet.pivot={!stats=stat1}m100_5_ss& f.m100_5_ss.facet.limit=10
Only sorting by count was tested since legacy facets (pivot + stats component) do not support sorting buckets by anything else.