Class JaspellLookup

  • All Implemented Interfaces:
    org.apache.lucene.util.Accountable

    @Deprecated
    public class JaspellLookup
    extends org.apache.lucene.search.suggest.Lookup
    Deprecated.
    Migrate to one of the newer suggesters which are much more RAM efficient.
    Suggest implementation based on JaSpell.
    See Also:
    JaspellTernarySearchTrie
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.lucene.search.suggest.Lookup

        org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue, org.apache.lucene.search.suggest.Lookup.LookupResult
    • Field Summary

      • Fields inherited from class org.apache.lucene.search.suggest.Lookup

        CHARSEQUENCE_COMPARATOR
      • Fields inherited from interface org.apache.lucene.util.Accountable

        NULL_ACCOUNTABLE
    • Constructor Summary

      Constructors 
      Constructor Description
      JaspellLookup()
      Deprecated.
      Creates a new empty trie
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean add​(CharSequence key, Object value)
      Deprecated.
      Adds a new node if key already exists, otherwise replaces its value.
      void build​(org.apache.lucene.search.suggest.InputIterator iterator)
      Deprecated.
       
      Object get​(CharSequence key)
      Deprecated.
      Returns the value for the specified key, or null if the key does not exist.
      long getCount()
      Deprecated.
       
      boolean load​(org.apache.lucene.store.DataInput input)
      Deprecated.
       
      List<org.apache.lucene.search.suggest.Lookup.LookupResult> lookup​(CharSequence key, Set<org.apache.lucene.util.BytesRef> contexts, boolean onlyMorePopular, int num)
      Deprecated.
       
      long ramBytesUsed()
      Deprecated.
       
      boolean store​(org.apache.lucene.store.DataOutput output)
      Deprecated.
       
      • Methods inherited from class org.apache.lucene.search.suggest.Lookup

        build, load, lookup, lookup, store
      • Methods inherited from interface org.apache.lucene.util.Accountable

        getChildResources
    • Constructor Detail

      • JaspellLookup

        public JaspellLookup()
        Deprecated.
        Creates a new empty trie
        See Also:
        build(InputIterator)
    • Method Detail

      • build

        public void build​(org.apache.lucene.search.suggest.InputIterator iterator)
                   throws IOException
        Deprecated.
        Specified by:
        build in class org.apache.lucene.search.suggest.Lookup
        Throws:
        IOException
      • add

        public boolean add​(CharSequence key,
                           Object value)
        Deprecated.
        Adds a new node if key already exists, otherwise replaces its value.

        This method always returns false.

      • get

        public Object get​(CharSequence key)
        Deprecated.
        Returns the value for the specified key, or null if the key does not exist.
      • lookup

        public List<org.apache.lucene.search.suggest.Lookup.LookupResult> lookup​(CharSequence key,
                                                                                 Set<org.apache.lucene.util.BytesRef> contexts,
                                                                                 boolean onlyMorePopular,
                                                                                 int num)
        Deprecated.
        Specified by:
        lookup in class org.apache.lucene.search.suggest.Lookup
      • store

        public boolean store​(org.apache.lucene.store.DataOutput output)
                      throws IOException
        Deprecated.
        Specified by:
        store in class org.apache.lucene.search.suggest.Lookup
        Throws:
        IOException
      • load

        public boolean load​(org.apache.lucene.store.DataInput input)
                     throws IOException
        Deprecated.
        Specified by:
        load in class org.apache.lucene.search.suggest.Lookup
        Throws:
        IOException
      • ramBytesUsed

        public long ramBytesUsed()
        Deprecated.
      • getCount

        public long getCount()
        Deprecated.
        Specified by:
        getCount in class org.apache.lucene.search.suggest.Lookup