[ 
https://issues.apache.org/jira/browse/LUCENE-9476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17183197#comment-17183197
 ] 

Michael McCandless commented on LUCENE-9476:
--------------------------------------------

When a query computes facets, in the end it gets a set of `integer` ordinals 
and counts, and must resolve those ordinals to human friendly `FacetLabels`.

There might be 10s of such lookups.

With the change in LUCENE-9450, we are creating a new `BinaryDocValues` for 
every `ord to FacetLabel` lookup, but for this issue we should add a new API 
that takes `int[] ordinals` or so, and then returns `FacetLabel[]`, by first 
collating all ordinals into the segments (in the taxonomy index) and then 
creating one `BinaryDocValues` per segment and looking up the ordinals 
sequentially.  This should be a sizable speedup over what we are doing in 
LUCENE-9450, which is already also a bit faster than what we do in mainline now 
(use stored fields).

> Add a bulk ordinal->FacetLabel API
> ----------------------------------
>
>                 Key: LUCENE-9476
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9476
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/facet
>    Affects Versions: 8.6.1
>            Reporter: Gautam Worah
>            Priority: Minor
>              Labels: performance
>
> This issue is a spillover from the 
> [PR|https://github.com/apache/lucene-solr/pull/1733/files] for LUCENE 9450
> The idea here is to share a single {{BinaryDocValues}} instance per leaf per 
> query instead of creating a new one each time in the 
> {{DirectoryTaxonomyReader}}.
> Suggested by [~mikemccand]
>  
>  
>  



--
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

Reply via email to