[ https://issues.apache.org/jira/browse/LUCENE-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797130#action_12797130 ]
Michael McCandless commented on LUCENE-2127: -------------------------------------------- bq. I was just thinking of an array of ScoreDocs. I'm writing the benchmark code right now. With this approach, though, it seems like the FieldComparator doesn't quite work, b/c you have to pass in numHits, which then goes and allocates another array. Seems like it would need to be modified to take in an already filled array. A fixed array of ScoreDocs should work fine? But you do need to tell FieldComparator up front the biggest it will be, eg 20K in my example above (when you are intending to only return 10K in the end). You then refer to the slots in your ScoreDoc array when interacting w/ the comparator... FieldComparator needs to allocate a separate array to track whatever its internal values are, to do the comparisons. Fixing benchmark to allow for custom collector sounds great! > Improved large result handling > ------------------------------ > > Key: LUCENE-2127 > URL: https://issues.apache.org/jira/browse/LUCENE-2127 > Project: Lucene - Java > Issue Type: New Feature > Reporter: Grant Ingersoll > Assignee: Grant Ingersoll > Priority: Minor > > Per > http://search.lucidimagination.com/search/document/350c54fc90d257ed/lots_of_results#fbb84bd297d15dd5, > it would be nice to offer some other Collectors that are better at handling > really large number of results. This could be implemented in a variety of > ways via Collectors. For instance, we could have a raw collector that does > no sorting and just returns the ScoreDocs, or we could do as Mike suggests > and have Collectors that have heuristics about memory tradeoffs and only > heapify when appropriate. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org