On Fri, Dec 5, 2014 at 10:44 PM, Darin Amos <dari...@gmail.com> wrote:

>                         public Scorer scorer(){
>                                 TermsWithScoreCollector collector = new
> TermsWithScoreCollector();
>                                 JoinQuery.this.s.search(JoinQuery.this.q,
> collector);
>
>                                 //do the rest..
>
>                         }
>

Darin,
I hardly follow, but this approach either is not efficient or even doesn't
work. Generally join is O(n^2) operation, which is most impls try to
reduce. weight.scorer() is invoked per segment, and scorer yields results
only from a particular segment. However, fromQuery should run across all
segments. Hence, TermsWithScoreCollector will collect IDs globally again
and again.
As you can see, the current JoinUtil design is much more efficient, it
reuses global IDs hash across all "to" segments searches.


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mkhlud...@griddynamics.com>

Reply via email to