[ https://issues.apache.org/jira/browse/LUCENE-9619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17451560#comment-17451560 ]
Ignacio Vera commented on LUCENE-9619: -------------------------------------- {quote}We are losing the ability to take advantage of grow() with this proposal, aren't we? {quote} What we are doing is to move the call to grow() to the intersects algorithm instead of expecting that PointTree implementations are calling it. I actually think this is better than the current implementation as I think trees should not have to do it (It is an intersects implementation detail). Anyway if we are not moving with this proposal we should document that PointTree implementations are expected to call grow() in #visitDocIDs and #visitDocValues methods? {quote}I'm a bit on the fence about the {{visitDocValues}} method that only takes a {{DocValuesVisitor}} since it encourages leveraging the tree in a slow way that reads all values and doc IDs {quote} I have the opposite feeling. If a user is using the programatic API, when it calls #visitDocValues, it wants to visit all doc and values. The method that takes the filter is only related to #intersects, and what we are trying to do is to encourage other uses? I think we should move the IntersectVisitor out as it seems to flag that the trees are only meant to do interacts like operations which is not true. > Move Points from a visitor API to a cursor-style API? > ----------------------------------------------------- > > Key: LUCENE-9619 > URL: https://issues.apache.org/jira/browse/LUCENE-9619 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Adrien Grand > Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > Points' visitor API work well but there are a couple things we could make > better if we moved to a cursor API, e.g. > - Term queries could return a DocIdSetIterator without having to materialize > a BitSet. > - Nearest-neighbor search could work on top of the regular API instead of > casting to BKDReader > https://github.com/apache/lucene-solr/blob/6a7131ee246d700c2436a85ddc537575de2aeacf/lucene/sandbox/src/java/org/apache/lucene/sandbox/document/FloatPointNearestNeighbor.java#L296 > - We could optimize counting the number of matches of a query by adding the > number of points in a leaf without visiting documents where there are no > deleted documents and a leaf fully matches the query. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org