[
https://issues.apache.org/jira/browse/LUCENE-5476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918017#comment-13918017
]
Rob Audenaerde commented on LUCENE-5476:
----------------------------------------
Quick update:
I implemented the single pass on the 'addDoc' method using a fixed interval
(which should be the fastest implementation I guess)
Exact: 180ms
Single Pass (no-clone) Fixed Interval: 38ms.
This is a 4.5x speed-up.
I will compare this later on with a single pass random indexed approach.
{quote}
Hmm, I don't think the single-pass option would require
xorshift.nextInt() on every call? Couldn't you keep a countInBin
field in your SampledDocs, increment it on each Docs.addDoc, and when
it's == randomIndex, add to the sampled bits and then pick a new
randomIndex? This should save a 2nd pass iteration?
{quote}
Yes I thought of this too. I will update this. I think I prefer the single pass
option myself, as I do not need the original bitset and the faster option.
> Facet sampling
> --------------
>
> Key: LUCENE-5476
> URL: https://issues.apache.org/jira/browse/LUCENE-5476
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Rob Audenaerde
> Attachments: LUCENE-5476.patch, LUCENE-5476.patch,
> SamplingComparison_SamplingFacetsCollector.java, SamplingFacetsCollector.java
>
>
> With LUCENE-5339 facet sampling disappeared.
> When trying to display facet counts on large datasets (>10M documents)
> counting facets is rather expensive, as all the hits are collected and
> processed.
> Sampling greatly reduced this and thus provided a nice speedup. Could it be
> brought back?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]