public class WindowSupportingLuceneCorpusAdapter extends LuceneCorpusAdapter implements WindowSupportingAdapter
| Modifier and Type | Field and Description |
|---|---|
protected String |
docLengthFieldName |
protected int[][] |
histogram |
static String |
HISTOGRAM_FILE_SUFFIX |
private static org.slf4j.Logger |
LOGGER |
contexts, dirReader, fieldName, reader| Modifier | Constructor and Description |
|---|---|
protected |
WindowSupportingLuceneCorpusAdapter(org.apache.lucene.index.DirectoryReader dirReader,
org.apache.lucene.index.AtomicReader[] reader,
org.apache.lucene.index.AtomicReaderContext[] contexts,
String textFieldName,
String docLengthFieldName,
int[][] histogram) |
| Modifier and Type | Method and Description |
|---|---|
static WindowSupportingLuceneCorpusAdapter |
create(String indexPath,
String textFieldName,
String docLengthFieldName) |
int[][] |
getDocumentSizeHistogram()
Returns the histogram of the document sizes of the corpus.
|
protected void |
requestDocumentsWithWord(String word,
com.carrotsearch.hppc.IntObjectOpenHashMap<com.carrotsearch.hppc.IntArrayList[]> positionsInDocs,
com.carrotsearch.hppc.IntIntOpenHashMap docLengths,
int wordId,
int numberOfWords) |
com.carrotsearch.hppc.IntObjectOpenHashMap<com.carrotsearch.hppc.IntArrayList[]> |
requestWordPositionsInDocuments(String[] words,
com.carrotsearch.hppc.IntIntOpenHashMap docLengths)
Returns the positions of the given words inside the corpus.
|
close, create, getDocumentsWithWords, getDocumentsWithWordsAsSet, getNumberOfDocumentsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseprivate static final org.slf4j.Logger LOGGER
public static final String HISTOGRAM_FILE_SUFFIX
protected int[][] histogram
protected String docLengthFieldName
protected WindowSupportingLuceneCorpusAdapter(org.apache.lucene.index.DirectoryReader dirReader,
org.apache.lucene.index.AtomicReader[] reader,
org.apache.lucene.index.AtomicReaderContext[] contexts,
String textFieldName,
String docLengthFieldName,
int[][] histogram)
public static WindowSupportingLuceneCorpusAdapter create(String indexPath, String textFieldName, String docLengthFieldName) throws org.apache.lucene.index.CorruptIndexException, IOException
org.apache.lucene.index.CorruptIndexExceptionIOExceptionpublic int[][] getDocumentSizeHistogram()
WindowSupportingAdaptergetDocumentSizeHistogram in interface WindowSupportingAdapterpublic com.carrotsearch.hppc.IntObjectOpenHashMap<com.carrotsearch.hppc.IntArrayList[]> requestWordPositionsInDocuments(String[] words, com.carrotsearch.hppc.IntIntOpenHashMap docLengths)
WindowSupportingAdapterrequestWordPositionsInDocuments in interface WindowSupportingAdapterwords - the words for which the positions inside the documents should
be determineddocLengths - empty int int map in which the document lengths and counts are
insertedprotected void requestDocumentsWithWord(String word, com.carrotsearch.hppc.IntObjectOpenHashMap<com.carrotsearch.hppc.IntArrayList[]> positionsInDocs, com.carrotsearch.hppc.IntIntOpenHashMap docLengths, int wordId, int numberOfWords)
Copyright © 2014–2016. All rights reserved.