org.apache.lucene.index
Class TermVectorAccessor

java.lang.Object
  extended by org.apache.lucene.index.TermVectorAccessor

public class TermVectorAccessor
extends Object

Transparent access to the vector space model, either via TermFreqVector or by resolving it from the inverted index.

Resolving a term vector from a large index can be a time consuming process.

Warning! This class is not thread safe!


Constructor Summary
TermVectorAccessor()
           
 
Method Summary
 void accept(IndexReader indexReader, int documentNumber, String fieldName, TermVectorMapper mapper)
          Visits the TermVectorMapper and populates it with terms available for a given document, either via a vector created at index time or by resolving them from the inverted index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TermVectorAccessor

public TermVectorAccessor()
Method Detail

accept

public void accept(IndexReader indexReader,
                   int documentNumber,
                   String fieldName,
                   TermVectorMapper mapper)
            throws IOException
Visits the TermVectorMapper and populates it with terms available for a given document, either via a vector created at index time or by resolving them from the inverted index.

Parameters:
indexReader - Index source
documentNumber - Source document to access
fieldName - Field to resolve
mapper - Mapper to be mapped with data
Throws:
IOException


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