lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7994) Use int/int hash map for int taxonomy facet counts
Date Mon, 23 Oct 2017 18:31:00 GMT


Michael McCandless commented on LUCENE-7994:

bq. Those hash collisions, on the other hand, were possible to hit with trivial map-iteration-copying
blocks and they were nasty (and people rightfully didn't and couldn't anticipate them to happen).
So I went for "better slower than sorry" direction...

I agree that is the right tradeoff!  Reduce the chances of adversarial cases ...

Thanks [~dweiss].

> Use int/int hash map for int taxonomy facet counts
> --------------------------------------------------
>                 Key: LUCENE-7994
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: master (8.0), 7.2
>         Attachments: LUCENE-7994.patch, LUCENE-7994.patch
> Int taxonomy facets today always count into a dense {{int[]}}, which is wasteful in cases
where the number of unique facet labels is high and the size of the current result set is
> I factored the native hash map from LUCENE-7927 and use a simple heuristic (customizable
by the user by subclassing) to decide up front whether to count sparse or dense.  I also made
loading of the large children and siblings {{int[]}} lazy, so that they are only instantiated
if you really need them.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message