schema=this.schema;
}else{
schema=readerleft.getSchema();
}
FieldType ftleft=schema.getFieldType(fieldLeft);
String prefixLeft=TrieField.getMainValuePrefix(ftleft);
Term tiLeft=new Term(fieldLeft, prefixLeft==null?"":prefixLeft);
TermEnum teLeft = null;
TermDocs tdleft=null;
if(this.leftreader!=null)
{
this.joinRevert=new int[this.leftreader.maxDoc()+1];
tdleft=this.leftreader.termDocs();
teLeft=this.leftreader.terms(tiLeft);
}else{
this.joinRevert=new int[readerleft.getReader().maxDoc()+1];
teLeft=readerleft.getReader().terms(tiLeft);
tdleft=readerleft.getReader().termDocs();
}
for(int i=0;i<this.joinRevert.length;i++)
{
this.joinRevert[i]=-1;
}
FieldType ftright =readerright.getSchema().getFieldType(fieldRigth);
String prefixRight=TrieField.getMainValuePrefix(ftright);
Term tiRight=new Term(fieldRigth, prefixRight==null?"":prefixRight);
TermEnum teRight = readerright.getReader().terms(tiRight.createTerm(prefixRight==null?"":prefixRight));
TermDocs tdRight=readerright.getReader().termDocs();
this.join=new int[readerright.getReader().maxDoc()+1][];
for(int i=0;i<this.join.length;i++)
{
this.join[i]=null;
}
int[] docs = new int[1000];
int[] freqs = new int[1000];
int debugline=0;
HashMap<Integer,HashSet<Integer>> join_tmp=new HashMap<Integer,HashSet<Integer>>();
// HashMap<Integer,Integer> joinRevert_tmp=new HashMap<Integer,Integer>();
for (;;) {
Term tleft= teLeft.term();
Term tRight=teRight.term();
if (tleft == null||tRight==null) {
LOG.info("###termbreak###"+String.valueOf(tleft)+">>>>"+String.valueOf(tRight)+","+fieldLeft+","+fieldRigth);
break;
}
if((!tleft.field().equals(fieldLeft))||(!tRight.field().equals(fieldRigth)))
{
LOG.info("###termbreak fieldchange###"+String.valueOf(tleft)+">>>>"+String.valueOf(tRight)+","+fieldLeft+","+fieldRigth);
break;
}
String tvleft=ftleft.indexedToReadable(tleft.text());
String tvRight=ftright.indexedToReadable(tRight.text());
if(tvleft.equals(tvRight))
{
if(debugline++<10)