You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Martijn van Groningen (JIRA)" <ji...@apache.org> on 2015/03/09 00:39:38 UTC
[jira] [Commented] (LUCENE-6332) join query scanning "toField"
docValue
[ https://issues.apache.org/jira/browse/LUCENE-6332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352350#comment-14352350 ]
Martijn van Groningen commented on LUCENE-6332:
-----------------------------------------------
+1 I think it makes sense for the query time join to leverage the `TwoPhaseIterator` optimization. For the scoring based query that is trivial (just override `asTwoPhaseIterator()` method in the scorer), but for the `TermsQuery` is tricker as it seems that via the `MultiTermQuery` the TwoPhaseIterator optimization isn't accessible.
> join query scanning "toField" docValue
> -----------------------------------------
>
> Key: LUCENE-6332
> URL: https://issues.apache.org/jira/browse/LUCENE-6332
> Project: Lucene - Core
> Issue Type: New Feature
> Components: modules/join
> Affects Versions: 5.0
> Reporter: Mikhail Khludnev
>
> I want to contribute the subj which should do something like ..{{WHERE EXISTS (SELECT 1 FROM fromSearcher.search(fromQuery) WHERE fromField=toField)}}. It turns out, that it can be returned by the current method {{createJoinQuery(...ScoreMode.None)}}
> * at first, it should run {{fromQuery}} first, collect {{fromField}} into {{BytesRefHash}} by {{TermsCollector}}, like it's done now
> * then it should return query with _TwoPhase_ Scorer
> * which obtains {{toField}} docValue on {{matches()}} and check term for existence in {{BytesRefHash}}
> Do you think it's ever useful? if you do, I can bake a patch.
> Anyway, suggest the better API eg separate method, or enum and actual name!
--
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