Class LuceneDictionary

  • All Implemented Interfaces:
    Dictionary

    public class LuceneDictionary
    extends java.lang.Object
    implements Dictionary
    Lucene Dictionary: terms taken from the given field of a Lucene index.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String field  
      private IndexReader reader  
    • Constructor Summary

      Constructors 
      Constructor Description
      LuceneDictionary​(IndexReader reader, java.lang.String field)
      Creates a new Dictionary, pulling source terms from the specified field in the provided reader
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      InputIterator getEntryIterator()
      Returns an iterator over all the entries
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • field

        private java.lang.String field
    • Constructor Detail

      • LuceneDictionary

        public LuceneDictionary​(IndexReader reader,
                                java.lang.String field)
        Creates a new Dictionary, pulling source terms from the specified field in the provided reader
    • Method Detail

      • getEntryIterator

        public final InputIterator getEntryIterator()
                                             throws java.io.IOException
        Description copied from interface: Dictionary
        Returns an iterator over all the entries
        Specified by:
        getEntryIterator in interface Dictionary
        Returns:
        Iterator
        Throws:
        java.io.IOException