Tabnine Logo
FSTEnum.getCurrentLabel
Code IndexAdd Tabnine to your IDE (free)

How to use
getCurrentLabel
method
in
org.apache.lucene.util.fst.FSTEnum

Best Java code snippets using org.apache.lucene.util.fst.FSTEnum.getCurrentLabel (Showing top 4 results out of 315)

origin: org.apache.lucene/lucene-core

/** Rewinds enum state to match the shared prefix between
 *  current term and target term */
protected final void rewindPrefix() throws IOException {
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
  return;
 }
 //System.out.println("  rewind upto=" + upto + " vs targetLength=" + targetLength);
 final int currentLimit = upto;
 upto = 1;
 while (upto < currentLimit && upto <= targetLength+1) {
  final int cmp = getCurrentLabel() - getTargetLabel();
  if (cmp < 0) {
   // seek forward
   //System.out.println("    seek fwd");
   break;
  } else if (cmp > 0) {
   // seek backwards -- reset this arc to the first arc
   final FST.Arc<T> arc = getArc(upto);
   fst.readFirstTargetArc(getArc(upto-1), arc, fstReader);
   //System.out.println("    seek first arc");
   break;
  }
  upto++;
 }
 //System.out.println("  fall through upto=" + upto);
}
origin: org.infinispan/infinispan-embedded-query

/** Rewinds enum state to match the shared prefix between
 *  current term and target term */
protected final void rewindPrefix() throws IOException {
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
  return;
 }
 //System.out.println("  rewind upto=" + upto + " vs targetLength=" + targetLength);
 final int currentLimit = upto;
 upto = 1;
 while (upto < currentLimit && upto <= targetLength+1) {
  final int cmp = getCurrentLabel() - getTargetLabel();
  if (cmp < 0) {
   // seek forward
   //System.out.println("    seek fwd");
   break;
  } else if (cmp > 0) {
   // seek backwards -- reset this arc to the first arc
   final FST.Arc<T> arc = getArc(upto);
   fst.readFirstTargetArc(getArc(upto-1), arc, fstReader);
   //System.out.println("    seek first arc");
   break;
  }
  upto++;
 }
 //System.out.println("  fall through upto=" + upto);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/** Rewinds enum state to match the shared prefix between
 *  current term and target term */
protected final void rewindPrefix() throws IOException {
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
  return;
 }
 //System.out.println("  rewind upto=" + upto + " vs targetLength=" + targetLength);
 final int currentLimit = upto;
 upto = 1;
 while (upto < currentLimit && upto <= targetLength+1) {
  final int cmp = getCurrentLabel() - getTargetLabel();
  if (cmp < 0) {
   // seek forward
   //System.out.println("    seek fwd");
   break;
  } else if (cmp > 0) {
   // seek backwards -- reset this arc to the first arc
   final FST.Arc<T> arc = getArc(upto);
   fst.readFirstTargetArc(getArc(upto-1), arc, fstReader);
   //System.out.println("    seek first arc");
   break;
  }
  upto++;
 }
 //System.out.println("  fall through upto=" + upto);
}
origin: harbby/presto-connectors

/** Rewinds enum state to match the shared prefix between
 *  current term and target term */
protected final void rewindPrefix() throws IOException {
 if (upto == 0) {
  //System.out.println("  init");
  upto = 1;
  fst.readFirstTargetArc(getArc(0), getArc(1), fstReader);
  return;
 }
 //System.out.println("  rewind upto=" + upto + " vs targetLength=" + targetLength);
 final int currentLimit = upto;
 upto = 1;
 while (upto < currentLimit && upto <= targetLength+1) {
  final int cmp = getCurrentLabel() - getTargetLabel();
  if (cmp < 0) {
   // seek forward
   //System.out.println("    seek fwd");
   break;
  } else if (cmp > 0) {
   // seek backwards -- reset this arc to the first arc
   final FST.Arc<T> arc = getArc(upto);
   fst.readFirstTargetArc(getArc(upto-1), arc, fstReader);
   //System.out.println("    seek first arc");
   break;
  }
  upto++;
 }
 //System.out.println("  fall through upto=" + upto);
}
org.apache.lucene.util.fstFSTEnumgetCurrentLabel

Popular methods of FSTEnum

  • doSeekCeil
    Seeks to smallest term that's >= target.
  • doSeekExact
    Seeks to exactly target term.
  • doSeekFloor
    Seeks to largest term that's <= target.
  • getArc
  • getTargetLabel
  • grow
  • incr
  • pushFirst
  • pushLast
  • rewindPrefix
    Rewinds enum state to match the shared prefix between current term and target term
  • setCurrentLabel
  • setCurrentLabel

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • 21 Best IntelliJ 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