/** * Creates a document index entry */ public DocumentIndexEntry newInstance() { return new BasicDocumentIndexEntry(); } }
@Override public void readFields(DataInput in) throws IOException { // TODO Auto-generated method stub super.readFields(in); docid=in.readInt(); }
/** {@inheritDoc} */ public DocumentIndexEntry getDocumentEntry(int docid) throws IOException { BasicDocumentIndexEntry die = new BasicDocumentIndexEntry(); die.setDocumentLength(docLengths.get(docid)); return die; }
@Override public void write(DataOutput out) throws IOException { super.write(out); for(int field_l : fieldLengths) out.writeInt(field_l); }
/** * {@inheritDoc} */ public void setBitIndexPointer(BitIndexPointer pointer) { entries = pointer.getNumberOfEntries(); setOffset(pointer); } /**
@Override public void write(DataOutput out) throws IOException { // TODO Auto-generated method stub super.write(out); out.writeInt(docid); }
/** * {@inheritDoc} */ public void setBitIndexPointer(BitIndexPointer pointer) { entries = pointer.getNumberOfEntries(); setOffset(pointer); } /**
/** * Creates a document index entry */ public DocumentIndexEntry newInstance() { return new BasicDocumentIndexEntry(); } }
public DocumentIndexEntry next() { BasicDocumentIndexEntry die = new BasicDocumentIndexEntry(); die.setDocumentLength(docLengths.get(index++)); return die; }
@Override public void write(DataOutput out) throws IOException { super.write(out); for(int field_l : fieldLengths) out.writeInt(field_l); }
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); final int l = fieldLengths.length; for(int i=0;i<l;i++) fieldLengths[i] = in.readInt(); }
/** Return a DocumentIndexEntry for this document */ public DocumentIndexEntry getDocumentStatistics() { DocumentIndexEntry die = new BasicDocumentIndexEntry(); die.setDocumentLength(this.getDocumentLength()); die.setNumberOfEntries(this.getNumberOfPointers()); return die; }
public Entry<Integer, DocumentIndexEntry> next() { BasicDocumentIndexEntry die = new BasicDocumentIndexEntry(); die.setDocumentLength(docLengths.get(index++)); Entry<Integer, DocumentIndexEntry> e = new MapEntry<Integer, DocumentIndexEntry>(index, die); return e; }
@Override public void write(DataOutput out) throws IOException { // TODO Auto-generated method stub super.write(out); out.writeInt(docid); }
@Override public void readFields(DataInput in) throws IOException { // TODO Auto-generated method stub super.readFields(in); docid=in.readInt(); }
if (fieldCount == 0) die = new BasicDocumentIndexEntry(old);
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); final int l = fieldLengths.length; for(int i=0;i<l;i++) fieldLengths[i] = in.readInt(); }
emptyDocIndexEntry = (FieldScore.FIELDS_COUNT > 0) ? new FieldDocumentIndexEntry(FieldScore.FIELDS_COUNT) : new BasicDocumentIndexEntry();
emptyDocIndexEntry = (FieldScore.FIELDS_COUNT > 0) ? new FieldDocumentIndexEntry(FieldScore.FIELDS_COUNT) : new BasicDocumentIndexEntry();