@Override protected void addPosting(Posting _p) { super.addPosting(_p); FieldPosting p = (FieldPosting)_p; final int[] thisPostingFieldFreqs = p.getFieldFrequencies(); for(int fi=0;fi<fieldCount;fi++) fieldFreqs[fi] += thisPostingFieldFreqs[fi]; }
@Override protected void addPosting(Posting _p) { super.addPosting(_p); FieldPosting p = (FieldPosting)_p; final int[] thisPostingFieldFreqs = p.getFieldFrequencies(); for(int fi=0;fi<fieldCount;fi++) fieldFreqs[fi] += thisPostingFieldFreqs[fi]; }
@Override protected void addPosting(Posting p) { super.addPosting(p); positions.addAll(((BlockPosting)p).getPositions()); }
@Override protected void addPosting(Posting p) { super.addPosting(p); positions.addAll(((BlockPosting)p).getPositions()); }
/** {@inheritDoc} */ @Override public int next() throws IOException { IterablePosting ip = postingQueue.poll(); if (ip == null) return id = IterablePosting.EOL; id = ip.getId(); firstPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); while(postingQueue.size() > 0 && postingQueue.peek().getId() == id) { ip = postingQueue.poll(); addPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); } return id; }
/** {@inheritDoc} */ @Override public int next() throws IOException { IterablePosting ip = postingQueue.poll(); if (ip == null) return id = IterablePosting.EOL; id = ip.getId(); firstPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); while(postingQueue.size() > 0 && postingQueue.peek().getId() == id) { ip = postingQueue.poll(); addPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); } return id; }
@Override public int next(int target) throws IOException { final IterablePosting ips[] = postingQueue.toArray(new IterablePosting[postingQueue.size()]); postingQueue.clear(); boolean OK = false; for(IterablePosting ip : ips) { if (ip.getId() >= target || (ip.next(target) != IterablePosting.EOL)) { postingQueue.add(ip); OK = true; } } if (! OK) return id = IterablePosting.EOL; IterablePosting ip = postingQueue.poll(); id = ip.getId(); firstPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); while(postingQueue.size() > 0 && postingQueue.peek().getId() == id) { ip = postingQueue.poll(); addPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); } return id; }
@Override public int next(int target) throws IOException { final IterablePosting ips[] = postingQueue.toArray(new IterablePosting[postingQueue.size()]); postingQueue.clear(); boolean OK = false; for(IterablePosting ip : ips) { if (ip.getId() >= target || (ip.next(target) != IterablePosting.EOL)) { postingQueue.add(ip); OK = true; } } if (! OK) return id = IterablePosting.EOL; IterablePosting ip = postingQueue.poll(); id = ip.getId(); firstPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); while(postingQueue.size() > 0 && postingQueue.peek().getId() == id) { ip = postingQueue.poll(); addPosting(ip); if (ip.next() != IterablePosting.EOL) postingQueue.add(ip); } return id; }