Class SortingStrategy
java.lang.Object
org.apache.lucene.analysis.hunspell.SortingStrategy
The strategy defining how a Hunspell dictionary should be loaded, with different tradeoffs. The
entries should be sorted in a special way, and this can be done either in-memory (faster, but
temporarily allocating more memory) or using disk (slower, but not needing much memory).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SortingStrategy
inMemory()
The strategy that loads all entries asString
objects and sorts them in memory.static SortingStrategy
An "offline" strategy that creates temporary files in the given directory and uses them for sorting withOfflineSorter
.
-
Constructor Details
-
SortingStrategy
public SortingStrategy()
-
-
Method Details
-
offline
An "offline" strategy that creates temporary files in the given directory and uses them for sorting withOfflineSorter
. It's slower thaninMemory()
, but doesn't need to load the entire dictionary into memory. -
inMemory
The strategy that loads all entries asString
objects and sorts them in memory. The entries are then stored in a more compressed way, and the strings are gc-ed, but the loading itself needsO(dictionary_size)
memory.
-