Interface SynonymMapConfig

All Known Implementing Classes:
EnglishSynonymMapConfig, EnglishSynonymMapConfig.AuthoritativeOnlyEnglishSynonymMapConfig, EnglishSynonymMapConfig.ExpandedEnglishSynonymMapConfig

@API(EXPERIMENTAL) public interface SynonymMapConfig
Configuration of the synonym map, which is built from a file.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether to include all synonyms of the original phrases in the map or only the authoritative one.
    Get the name of the synonymMap to build.
    Get solr format input stream to build the synonymMap.
     
  • Method Details

    • getName

      String getName()
      Get the name of the synonymMap to build.
      Returns:
      the name
    • getSynonymInputStream

      InputStream getSynonymInputStream()
      Get solr format input stream to build the synonymMap.
      Returns:
      the input stream
    • expand

      boolean expand()
      Whether to include all synonyms of the original phrases in the map or only the authoritative one. The SynonymGraphFilter needs to be included in both index and query analyzer if this returns false.
      Returns:
      true if all synonyms are included
    • openFile

      @Nonnull static InputStream openFile(@Nonnull String file)