/** advance a PhrasePosition and update 'end', return false if exhausted */ private boolean advancePP(PhrasePositions pp) throws IOException { if (!pp.nextPosition()) { return false; } if (pp.position > end) { end = pp.position; } return true; }
final void firstPosition() throws IOException { count = postings.freq(); // read first pos nextPosition(); }
if (!rg[j].nextPosition()) { return false; // PPs exhausted
/** advance a PhrasePosition and update 'end', return false if exhausted */ private boolean advancePP(PhrasePositions pp) throws IOException { if (!pp.nextPosition()) { return false; } if (pp.position > end) { end = pp.position; } return true; }
/** advance a PhrasePosition and update 'end', return false if exhausted */ private boolean advancePP(PhrasePositions pp) throws IOException { if (!pp.nextPosition()) { return false; } if (pp.position > end) { end = pp.position; } return true; }
/** advance a PhrasePosition and update 'end', return false if exhausted */ private boolean advancePP(PhrasePositions pp) throws IOException { if (!pp.nextPosition()) { return false; } if (pp.position > end) { end = pp.position; } return true; }
final void firstPosition() throws IOException { count = tp.freq(); // read first pos nextPosition(); }
final void firstPosition() throws IOException { count = postings.freq(); // read first pos nextPosition(); }
final void firstPosition() throws IOException { count = tp.freq(); // read first pos nextPosition(); }
final void firstPosition() throws IOException { count = postings.freq(); // read first pos nextPosition(); }
final void firstPosition() throws IOException { count = postings.freq(); // read first pos nextPosition(); }
final void firstPosition() throws IOException { count = tp.freq(); // read first pos nextPosition(); }
protected final float phraseFreq() throws IOException { // sort list with pq for (PhrasePositions pp = first; pp != null; pp = pp.next) { pp.firstPosition(); pq.put(pp); // build pq from list } pqToList(); // rebuild list from pq int freq = 0; do { // find position w/ all terms while (first.position < last.position) { // scan forward in first do { if (!first.nextPosition()) return (float)freq; } while (first.position < last.position); firstToLast(); } freq++; // all equal: a match } while (last.nextPosition()); return (float)freq; } }
protected final float phraseFreq() throws IOException { // sort list with pq pq.clear(); for (PhrasePositions pp = first; pp != null; pp = pp.next) { pp.firstPosition(); pq.put(pp); // build pq from list } pqToList(); // rebuild list from pq // for counting how many times the exact phrase is found in current document, // just count how many times all PhrasePosition's have exactly the same position. int freq = 0; do { // find position w/ all terms while (first.position < last.position) { // scan forward in first do { if (!first.nextPosition()) return (float)freq; } while (first.position < last.position); firstToLast(); } freq++; // all equal: a match } while (last.nextPosition()); return (float)freq; } }
protected final float phraseFreq() throws IOException { // sort list with pq pq.clear(); for (PhrasePositions pp = first; pp != null; pp = pp.next) { pp.firstPosition(); pq.put(pp); // build pq from list } pqToList(); // rebuild list from pq // for counting how many times the exact phrase is found in current document, // just count how many times all PhrasePosition's have exactly the same position. int freq = 0; do { // find position w/ all terms while (first.position < last.position) { // scan forward in first do { if (!first.nextPosition()) return (float)freq; } while (first.position < last.position); firstToLast(); } freq++; // all equal: a match } while (last.nextPosition()); return (float)freq; } }
if (!rg[j].nextPosition()) { return false; // PPs exhausted
if (!rg[j].nextPosition()) { return false; // PPs exhausted
for (int pos = start; pos <= next; pos = pp.position) { if (!pp.nextPosition()) { done = true; // ran out of a term -- done break;
if (pos<=next && tpsDiffer) if (!pp.nextPosition()) { done = true; // ran out of a term -- done break;
if (pos<=next && tpsDiffer) if (!pp.nextPosition()) { done = true; // ran out of a term -- done break;