[ https://issues.apache.org/jira/browse/SOLR-13132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17155079#comment-17155079 ]
ASF subversion and git services commented on SOLR-13132: -------------------------------------------------------- Commit 499a4503de770980b8cbcdc4dc15a17fd1f94f74 in lucene-solr's branch refs/heads/branch_8x from Michael Gibney [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=499a450 ] SOLR-13132: JSON Facet perf improvements to support "sweeping" collection of "relatedness()" This adds a lot of "under the covers" improvements to how JSON Faceting FacetField processors work, to enable "sweeping" support when the SlotAcc used for sorting support it (currently just "relatedness()") This is a squash commit of all changes on https://github.com/magibney/lucene-solr/tree/SOLR-13132 Up to and including ca7a8e0b39840d00af9022c048346a7d84bf280d. Co-authored-by: Chris Hostetter <hoss...@apache.org> Co-authored-by: Michael Gibney <mich...@michaelgibney.net> (cherry picked from commit 40e2122b5a5b89f446e51692ef0d72e48c7b71e5 w/some small fixes for backporting issues) > Improve JSON "terms" facet performance when sorted by relatedness > ------------------------------------------------------------------ > > Key: SOLR-13132 > URL: https://issues.apache.org/jira/browse/SOLR-13132 > Project: Solr > Issue Type: Improvement > Components: Facet Module > Affects Versions: 7.4, master (9.0) > Reporter: Michael Gibney > Priority: Major > Attachments: SOLR-13132-benchmarks.tgz, > SOLR-13132-with-cache-01.patch, SOLR-13132-with-cache.patch, > SOLR-13132.patch, SOLR-13132_testSweep.patch > > Time Spent: 1.5h > Remaining Estimate: 0h > > When sorting buckets by {{relatedness}}, JSON "terms" facet must calculate > {{relatedness}} for every term. > The current implementation uses a standard uninverted approach (either > {{docValues}} or {{UnInvertedField}}) to get facet counts over the domain > base docSet, and then uses that initial pass as a pre-filter for a > second-pass, inverted approach of fetching docSets for each relevant term > (i.e., {{count > minCount}}?) and calculating intersection size of those sets > with the domain base docSet. > Over high-cardinality fields, the overhead of per-term docSet creation and > set intersection operations increases request latency to the point where > relatedness sort may not be usable in practice (for my use case, even after > applying the patch for SOLR-13108, for a field with ~220k unique terms per > core, QTime for high-cardinality domain docSets were, e.g.: cardinality > 1816684=9000ms, cardinality 5032902=18000ms). > The attached patch brings the above example QTimes down to a manageable > ~300ms and ~250ms respectively. The approach calculates uninverted facet > counts over domain base, foreground, and background docSets in parallel in a > single pass. This allows us to take advantage of the efficiencies built into > the standard uninverted {{FacetFieldProcessorByArray[DV|UIF]}}), and avoids > the per-term docSet creation and set intersection overhead. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org