[ 
https://issues.apache.org/jira/browse/LUCENE-6332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mikhail Khludnev updated LUCENE-6332:
-------------------------------------
    Attachment: LUCENE-6332.patch

attaching DocValuesScanQuery.java with a trivial test. It works for BinaryDV 
only (ord- coded Sorted(Set)DV can be implemented too, but avoiding term 
lookups is more preferable, eg LUCENE-6352). 
One more idea is to check number of collected terms at from side and choose 
between TermsQuery (lookup in term dict, current JoinUtil) and this approach - 
scanning all DV column. WDYT? 

> 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
>         Attachments: LUCENE-6332.patch
>
>
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to