com.atlassian.greenhopper.service.lucene
Class LeftJoin

java.lang.Object
  extended by com.atlassian.greenhopper.service.lucene.LeftJoin

public class LeftJoin
extends java.lang.Object

A query that performs a join between two indexes (left and right). This query can be used on the left index, and it selects documents in the left that match documents on the right. Documents on the left/right are "matched" using a fields with common values.

Specifically, this query will match documents in leftIndex, where leftdoc.leftField == rightdoc.rightField, and rightdoc is in rightDocIds;

This implementation doesn't do anything smart wrt to scoring at the moment.

Performance will be expected to be O(l+r); l is the number of Terms that match on the left, r is the number of terms that match on the right.

In the case where there is a 1-1 between left and right, best-case becomes O(1)

Author:
Matt Quail

Constructor Summary
LeftJoin(java.lang.String leftField, RightJoinEnum rightEnum)
           
 
Method Summary
 java.util.BitSet computeResult(org.apache.lucene.index.IndexReader leftReader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeftJoin

public LeftJoin(java.lang.String leftField,
                RightJoinEnum rightEnum)
Parameters:
leftField - the match field on the left
Method Detail

computeResult

public java.util.BitSet computeResult(org.apache.lucene.index.IndexReader leftReader)
                               throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2007-2012 Atlassian. All Rights Reserved.