org.apache.lucene.codecs.memory
Class FSTOrdTermsWriter

java.lang.Object
  extended by org.apache.lucene.codecs.FieldsConsumer
      extended by org.apache.lucene.codecs.memory.FSTOrdTermsWriter
All Implemented Interfaces:
Closeable

public class FSTOrdTermsWriter
extends FieldsConsumer

FST-based term dict, using ord as FST output. The FST holds the mapping between <term, ord>, and term's metadata is delta encoded into a single byte block. Typically the byte block consists of four parts: 1. term statistics: docFreq, totalTermFreq; 2. monotonic long[], e.g. the pointer to the postings list for that term; 3. generic byte[], e.g. other information customized by postings base. 4. single-level skip list to speed up metadata decoding by ord.

Files:

Term Index

The .tix contains a list of FSTs, one for each field. The FST maps a term to its corresponding order in current field.

Notes:

Term Block

The .tbk contains all the statistics and metadata for terms, along with field summary (e.g. per-field data like number of documents in current field). For each field, there are four blocks:

File Format:

Notes:

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int SKIP_INTERVAL
           
static int TERMS_VERSION_CURRENT
           
static int TERMS_VERSION_START
           
 
Constructor Summary
FSTOrdTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter)
           
 
Method Summary
 TermsConsumer addField(FieldInfo field)
           
 void close()
           
 
Methods inherited from class org.apache.lucene.codecs.FieldsConsumer
merge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TERMS_VERSION_START

public static final int TERMS_VERSION_START
See Also:
Constant Field Values

TERMS_VERSION_CURRENT

public static final int TERMS_VERSION_CURRENT
See Also:
Constant Field Values

SKIP_INTERVAL

public static final int SKIP_INTERVAL
See Also:
Constant Field Values
Constructor Detail

FSTOrdTermsWriter

public FSTOrdTermsWriter(SegmentWriteState state,
                         PostingsWriterBase postingsWriter)
                  throws IOException
Throws:
IOException
Method Detail

addField

public TermsConsumer addField(FieldInfo field)
                       throws IOException
Specified by:
addField in class FieldsConsumer
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class FieldsConsumer
Throws:
IOException


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.