|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.ae.lucene.STCCreator
public class STCCreator
Creates ScoredTermCollections from a LuceneIndex.
Field Summary | |
---|---|
private STCBuilder |
builder
|
private Filter<org.apache.lucene.index.Term> |
filter
|
private int |
index
|
private cern.colt.map.OpenIntIntHashMap |
indexMap
|
private boolean |
processTerm
|
private DateRange |
range
|
private java.lang.Integer |
termIndex
|
Constructor Summary | |
---|---|
STCCreator()
|
Method Summary | |
---|---|
void |
apply(int docId,
org.apache.lucene.document.Document doc,
int frequency,
float score)
Apply some implementor specific operation to the term and its data. |
ScoredTermsCollection |
createCollection(org.apache.lucene.index.IndexReader reader,
DateRange range)
Creates a ScoredTermsCollection. |
ScoredTermsCollection |
createCollection(org.apache.lucene.index.IndexReader reader,
Filter<org.apache.lucene.index.Term> filter,
DateRange range)
Creates a ScoredTermsCollection. |
void |
done()
Called after apply has been called for all the terms. |
void |
init(int docCount)
Called once prior to calling apply for any terms, documents. |
void |
newTerm(org.apache.lucene.index.Term term)
Called when a new Term is encounters during iterator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private STCBuilder builder
private java.lang.Integer termIndex
private Filter<org.apache.lucene.index.Term> filter
private DateRange range
private boolean processTerm
private cern.colt.map.OpenIntIntHashMap indexMap
private int index
Constructor Detail |
---|
public STCCreator()
Method Detail |
---|
public ScoredTermsCollection createCollection(org.apache.lucene.index.IndexReader reader, DateRange range) throws AIDAException, java.io.IOException
reader
- the reader used to read the lucene indexrange
- the date range for this ScoredTermsCollection
AIDAException
- if there is an error creating the collecion
java.io.IOException
- if there is an error reading the indexpublic ScoredTermsCollection createCollection(org.apache.lucene.index.IndexReader reader, Filter<org.apache.lucene.index.Term> filter, DateRange range) throws AIDAException, java.io.IOException
reader
- the reader used to read the index.filter
- the terms ultimately included in the collection must pass this filter.range
- the date range for this ScoredTermsCollection
AIDAException
- if there is an error creating the collecion
java.io.IOException
- if there is an error reading the indexpublic void init(int docCount) throws AIDAException
init
in interface TermFunction
docCount
- the number of documents in the index.
AIDAException
- if there is an error during initialization.public void newTerm(org.apache.lucene.index.Term term)
newTerm
in interface TermFunction
term
- the new term.public void apply(int docId, org.apache.lucene.document.Document doc, int frequency, float score) throws AIDAException
newTerm(org.apache.lucene.index.Term)
.
apply
in interface TermFunction
docId
- the numeric id of the document. This is only valid between calls to init
and done.doc
- the document the term applies tofrequency
- the frequency count of the term in the documentscore
- the score of this term for the specified document.
AIDAException
- if there is an error.public void done() throws AIDAException
done
in interface TermFunction
AIDAException
- if there is an error during the "done" phase.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |