You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2015/01/23 20:41:36 UTC
[jira] [Comment Edited] (LUCENE-6198) two phase intersection
[ https://issues.apache.org/jira/browse/LUCENE-6198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14289801#comment-14289801 ]
Yonik Seeley edited comment on LUCENE-6198 at 1/23/15 7:41 PM:
---------------------------------------------------------------
I had thought about this a while ago via adding something like
{code}
interface ApproximateDISI {
int guessNext(); // returns next doc that has a chance of matching
int guessAdvance(int target); // returns next doc after target that has a chance of matching
boolean matches();
}
{code}
And then some scorers could optionally implement ApproximateDISI.
So I guess the main diff would come down to "instanceof ApproximateDISI" vs "getApproximation() != null" ?
edit: Although I think I do like the increased reuse potential of your way... it's just another DISI.
was (Author: yseeley@gmail.com):
I had thought about this a while ago via adding something like
{code}
interface ApproximateDISI {
int guessNext(); // returns next doc that has a chance of matching
int guessAdvance(int target); // returns next doc after target that has a chance of matching
boolean matches();
}
{code}
And then some scorers could optionally implement ApproximateDISI.
So I guess the main diff would come down to "instanceof ApproximateDISI" vs "getApproximation() != null" ?
> two phase intersection
> ----------------------
>
> Key: LUCENE-6198
> URL: https://issues.apache.org/jira/browse/LUCENE-6198
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Robert Muir
> Attachments: LUCENE-6198.patch
>
>
> Currently some scorers have to do a lot of per-document work to determine if a document is a match. The simplest example is a phrase scorer, but there are others (spans, sloppy phrase, geospatial, etc).
> Imagine a conjunction with two MUST clauses, one that is a term that matches all odd documents, another that is a phrase matching all even documents. Today this conjunction will be very expensive, because the zig-zag intersection is reading a ton of useless positions.
> The same problem happens with filteredQuery and anything else that acts like a conjunction.
--
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