Class LuceneDictionary

  • All Implemented Interfaces:
    Dictionary

    public class LuceneDictionary
    extends Object
    implements Dictionary
    Lucene Dictionary: terms taken from the given field of a Lucene index. When using IndexReader.terms(Term) the code must not call next() on TermEnum as the first call to TermEnum, see: http://issues.apache.org/jira/browse/LUCENE-6
    • Constructor Detail

      • LuceneDictionary

        public LuceneDictionary​(org.apache.lucene.index.IndexReader reader,
                                String field)
    • Method Detail

      • getWordsIterator

        public final org.apache.lucene.util.BytesRefIterator getWordsIterator()
                                                                       throws IOException
        Description copied from interface: Dictionary
        Return all words present in the dictionary
        Specified by:
        getWordsIterator in interface Dictionary
        Returns:
        Iterator
        Throws:
        IOException