public abstract class Tagger extends Object
tagCallback(int, int, Object)
.
This class should be independently usable outside Solr.Constructor and Description |
---|
Tagger(Terms terms,
Bits liveDocs,
TokenStream tokenStream,
TagClusterReducer tagClusterReducer,
boolean skipAltTokens,
boolean ignoreStopWords) |
Modifier and Type | Method and Description |
---|---|
void |
enableDocIdsCache(int initSize) |
protected IntsRef |
lookupDocIds(Object docIdsKey)
Returns a sorted array of integer docIds given the corresponding key.
|
void |
process() |
protected abstract void |
tagCallback(int startOffset,
int endOffset,
Object docIdsKey)
Invoked by
process() for each tag found. |
public Tagger(Terms terms, Bits liveDocs, TokenStream tokenStream, TagClusterReducer tagClusterReducer, boolean skipAltTokens, boolean ignoreStopWords) throws IOException
IOException
public void enableDocIdsCache(int initSize)
public void process() throws IOException
IOException
protected abstract void tagCallback(int startOffset, int endOffset, Object docIdsKey)
process()
for each tag found. endOffset is always >= the endOffset
given in the previous call.startOffset
- The character offset of the original stream where the tag starts.endOffset
- One more than the character offset of the original stream where the tag ends.docIdsKey
- A reference to the matching docIds that can be resolved via lookupDocIds(Object)
.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.