org.apache.lucene.codecs.memory
Class FSTTermsWriter

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

public class FSTTermsWriter
extends FieldsConsumer

FST-based term dict, using metadata as FST output. The FST directly holds the mapping between <term, metadata>. Term metadata consists of three 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 need by postings reader.

File:

Term Dictionary

The .tst contains a list of FSTs, one for each field. The FST maps a term to its corresponding statistics (e.g. docfreq) and metadata (e.g. information for postings list reader like file pointer to postings list).

Typically the metadata is separated into two parts:

File format:

Notes:

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

Field Summary
static int TERMS_VERSION_CURRENT
           
static int TERMS_VERSION_START
           
 
Constructor Summary
FSTTermsWriter(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
Constructor Detail

FSTTermsWriter

public FSTTermsWriter(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.