congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSystemService (Context)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Option (scala)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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