You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2016/04/26 08:38:12 UTC

[jira] [Commented] (LUCENE-7254) DocIDSetBuilder is no good for points

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

Robert Muir commented on LUCENE-7254:
-------------------------------------

by the way: DocIDSetBuilder could use some of this same logic for postings to remove its cardinality computation too: just substitute {{sumDocFreq}} for {{numPoints}}. But its the lesser of the problems here.

For later improvements, to try to do more fancy things so a DocIDSetBuilder-type approach works better, we can consider e.g. improving BKDReader.addAll to e.g. target its entire range more efficiently, call grow() less often but with bigger numbers (e.g. just once per addAll). But we should keep an eye on benchmarks because the current code makes visit(int doc) very hot for ranges.


> DocIDSetBuilder is no good for points
> -------------------------------------
>
>                 Key: LUCENE-7254
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7254
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-7254.patch, LUCENE-7254.patch
>
>
> For the postings lists, I think this approach works well in dense cases (e.g. whole DISI's are added, things are coming in order, etc).
> However in the points case, it holds back range performance significantly. There are a couple of problems here:
> * expensive cardinality computation (this is a 2% hit) when its totally unnecessary. we can use index statistics to help here.
> * lots of conditional stuff in add(). This includes growing checks / bitset switching checks and so on (which happens even if you are smart and call grow, but this stuff all adds up). 
> I dont think we should try to create a magical shared API that is both efficient for postings lists of unstructured stuff and at the same time point collection for structured fields, instead we should just do things differently for points and iterate from there.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org