lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5476) Facet sampling
Date Mon, 03 Mar 2014 10:40:23 GMT

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

Michael McCandless commented on LUCENE-5476:
--------------------------------------------

Patch looks good, and those are nice performance results!

But, can we please remove the SamplingParams class?  There are only 2
params now; if we get up to 6 or 7 params then maybe we should switch
to a separate config class.  I think one ctor taking only sampleRatio,
and then one other taking all params, is enough?

bq. When a segment has many docids but very few hits, they might be skipped altogether. If
this happens in many segments, the estimate gets more and more off
bq. When a segment is small, there might be a few hits that are never touched as the randomIndex
in the 'bin-o-hits' is greater than the index of the hit.

I think these limitations are acceptable?  In a large index, the
number of such "tiny" segments should be a tiny percentage of the doc
space; if not, something serious is wrong.

{quote}
bq. Another option, which would save the 2nd pass, would be to do the sampling during Docs.addDoc.

I considered sampling on the 'addDocument' but I figured it would be
more expensive as then for each hit we need to do a random()
calculation.
{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?


> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message