Tabnine Logo
PhrasePositions.nextPosition
Code IndexAdd Tabnine to your IDE (free)

How to use
nextPosition
method
in
org.apache.lucene.search.PhrasePositions

Best Java code snippets using org.apache.lucene.search.PhrasePositions.nextPosition (Showing top 20 results out of 315)

origin: org.apache.lucene/lucene-core

/** 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;
}

origin: org.apache.lucene/lucene-core

final void firstPosition() throws IOException {
 count = postings.freq();  // read first pos
 nextPosition();
}
origin: org.apache.lucene/lucene-core

if (!rg[j].nextPosition()) {
 return false; // PPs exhausted
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/** 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;
}

origin: harbby/presto-connectors

/** 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;
}

origin: org.infinispan/infinispan-embedded-query

/** 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;
}

origin: lucene/lucene

final void firstPosition() throws IOException {
 count = tp.freq();                  // read first pos
 nextPosition();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

final void firstPosition() throws IOException {
 count = postings.freq();  // read first pos
 nextPosition();
}
origin: org.apache.lucene/com.springsource.org.apache.lucene

final void firstPosition() throws IOException {
 count = tp.freq();                  // read first pos
 nextPosition();
}
origin: harbby/presto-connectors

final void firstPosition() throws IOException {
 count = postings.freq();  // read first pos
 nextPosition();
}
origin: org.infinispan/infinispan-embedded-query

final void firstPosition() throws IOException {
 count = postings.freq();  // read first pos
 nextPosition();
}
origin: org.apache.lucene/lucene-core-jfrog

final void firstPosition() throws IOException {
 count = tp.freq();                  // read first pos
 nextPosition();
}
origin: lucene/lucene

 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;
 }
}
origin: org.apache.lucene/com.springsource.org.apache.lucene

 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;
 }
}
origin: org.apache.lucene/lucene-core-jfrog

 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;
 }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

if (!rg[j].nextPosition()) {
 return false; // PPs exhausted
origin: org.infinispan/infinispan-embedded-query

if (!rg[j].nextPosition()) {
 return false; // PPs exhausted
origin: lucene/lucene

for (int pos = start; pos <= next; pos = pp.position) {
  if (!pp.nextPosition()) {
    done = true;				  // ran out of a term -- done
    break;
origin: org.apache.lucene/com.springsource.org.apache.lucene

if (pos<=next && tpsDiffer)
if (!pp.nextPosition()) {
  done = true;          // ran out of a term -- done
  break;
origin: org.apache.lucene/lucene-core-jfrog

if (pos<=next && tpsDiffer)
if (!pp.nextPosition()) {
  done = true;          // ran out of a term -- done
  break;
org.apache.lucene.searchPhrasePositionsnextPosition

Javadoc

Go to next location of this term current document, and set position as location - offset, so that a matching exact phrase is easily identified when all PhrasePositions have exactly the same position.

Popular methods of PhrasePositions

  • <init>
  • firstPosition
  • next
  • skipTo

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now