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

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

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

origin: org.apache.lucene/lucene-core

/** move all PPs to their first position */
private void placeFirstPositions() throws IOException {
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
 }
}
origin: org.apache.lucene/lucene-core

/** no repeats: simplest case, and most common. It is important to keep this piece of the code simple and efficient */
private void initSimple() throws IOException {
 //System.err.println("initSimple: doc: "+min.doc);
 pq.clear();
 // position pps and build queue from list
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
  if (pp.position > end) {
   end = pp.position;
  }
  pq.add(pp);
 }
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/** move all PPs to their first position */
private void placeFirstPositions() throws IOException {
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
 }
}
origin: harbby/presto-connectors

/** move all PPs to their first position */
private void placeFirstPositions() throws IOException {
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
 }
}
origin: org.infinispan/infinispan-embedded-query

/** move all PPs to their first position */
private void placeFirstPositions() throws IOException {
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
 }
}
origin: org.infinispan/infinispan-embedded-query

/** no repeats: simplest case, and most common. It is important to keep this piece of the code simple and efficient */
private void initSimple() throws IOException {
 //System.err.println("initSimple: doc: "+min.doc);
 pq.clear();
 // position pps and build queue from list
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
  if (pp.position > end) {
   end = pp.position;
  }
  pq.add(pp);
 }
}

origin: harbby/presto-connectors

/** no repeats: simplest case, and most common. It is important to keep this piece of the code simple and efficient */
private void initSimple() throws IOException {
 //System.err.println("initSimple: doc: "+min.doc);
 pq.clear();
 // position pps and build queue from list
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
  if (pp.position > end) {
   end = pp.position;
  }
  pq.add(pp);
 }
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/** no repeats: simplest case, and most common. It is important to keep this piece of the code simple and efficient */
private void initSimple() throws IOException {
 //System.err.println("initSimple: doc: "+min.doc);
 pq.clear();
 // position pps and build queue from list
 for (PhrasePositions pp : phrasePositions) {
  pp.firstPosition();
  if (pp.position > end) {
   end = pp.position;
  }
  pq.add(pp);
 }
}

origin: org.apache.lucene/lucene-core-jfrog

  pp.firstPosition();
  if (pp.position > end)
    end = pp.position;
pp.firstPosition();
origin: org.apache.lucene/com.springsource.org.apache.lucene

  pp.firstPosition();
  if (pp.position > end)
    end = pp.position;
pp.firstPosition();
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: lucene/lucene

int end = 0;
for (PhrasePositions pp = first; pp != null; pp = pp.next) {
  pp.firstPosition();
  if (pp.position > end)
    end = pp.position;
org.apache.lucene.searchPhrasePositionsfirstPosition

Popular methods of PhrasePositions

  • <init>
  • nextPosition
    Go to next location of this term current document, and setposition as location - offset, so that a m
  • next
  • skipTo

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Table (org.hibernate.mapping)
    A relational table
  • Top PhpStorm plugins
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