Class SynonymMap


  • public class SynonymMap
    extends Object
    A map of synonyms, keys and values are phrases.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SynonymMap.Builder
      Builds an FSTSynonymMap.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      org.apache.lucene.util.fst.FST<org.apache.lucene.util.BytesRef> fst
      map>
      int maxHorizontalContext
      maxHorizontalContext: maximum context we need on the tokenstream
      static char WORD_SEPARATOR
      for multiword support, you must separate words with this separator
      org.apache.lucene.util.BytesRefHash words
      map
    • Constructor Summary

      Constructors 
      Constructor Description
      SynonymMap​(org.apache.lucene.util.fst.FST<org.apache.lucene.util.BytesRef> fst, org.apache.lucene.util.BytesRefHash words, int maxHorizontalContext)  
    • Field Detail

      • WORD_SEPARATOR

        public static final char WORD_SEPARATOR
        for multiword support, you must separate words with this separator
        See Also:
        Constant Field Values
      • fst

        public final org.apache.lucene.util.fst.FST<org.apache.lucene.util.BytesRef> fst
        map>
      • words

        public final org.apache.lucene.util.BytesRefHash words
        map
      • maxHorizontalContext

        public final int maxHorizontalContext
        maxHorizontalContext: maximum context we need on the tokenstream
    • Constructor Detail

      • SynonymMap

        public SynonymMap​(org.apache.lucene.util.fst.FST<org.apache.lucene.util.BytesRef> fst,
                          org.apache.lucene.util.BytesRefHash words,
                          int maxHorizontalContext)