org.apache.solr.rest.schema.analysis

## Class ManagedSynonymFilterFactory

- java.lang.Object
- - org.apache.lucene.analysis.util.AbstractAnalysisFactory
  - - org.apache.lucene.analysis.util.TokenFilterFactory
    - - org.apache.solr.rest.schema.analysis.BaseManagedTokenFilterFactory
      - - org.apache.solr.rest.schema.analysis.ManagedSynonymFilterFactory

- All Implemented Interfaces:
    ResourceLoaderAware, ManagedResourceObserver

      public class ManagedSynonymFilterFactory
      extends BaseManagedTokenFilterFactory

  TokenFilterFactory and ManagedResource implementation for doing CRUD on synonyms using the REST API.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ManagedSynonymFilterFactory.SynonymManager` ManagedResource implementation for synonyms, which are so specialized that it makes sense to implement this class as an inner class as it has little application outside the SynonymFilterFactory use cases.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SynonymFilterFactory` | `delegate`
    `static String` | `IGNORE_CASE_INIT_ARG`
    `static String` | `SYNONYM_MAPPINGS`

    - ### Fields inherited from class org.apache.solr.rest.schema.analysis.BaseManagedTokenFilterFactory

      `handle`

    - ### Fields inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

      `LUCENE_MATCH_VERSION_PARAM, luceneMatchVersion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedSynonymFilterFactory(Map<String,String> args)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TokenStream` | `create(TokenStream input)`
    `protected Class<? extends ManagedResource>` | `getManagedResourceImplClass()` Let the concrete analysis component determine the ManagedResource implementation.
    `String` | `getResourceId()` Let the concrete analysis component decide the path it wishes to be managed at.
    `void` | `onManagedResourceInitialized(NamedList<?> initArgs, ManagedResource res)` Called once, during core initialization, to initialize any analysis components that depend on the data managed by this resource.

    - ### Methods inherited from class org.apache.solr.rest.schema.analysis.BaseManagedTokenFilterFactory

      `inform`

    - ### Methods inherited from class org.apache.lucene.analysis.util.TokenFilterFactory

      `availableTokenFilters, forName, lookupClass, reloadTokenFilters`

    - ### Methods inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory

      `get, get, get, get, get, getBoolean, getChar, getClassArg, getFloat, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSet, getSnowballWordSet, getWordSet, isExplicitLuceneMatchVersion, require, require, require, requireBoolean, requireChar, requireFloat, requireInt, setExplicitLuceneMatchVersion, splitFileNames`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SYNONYM_MAPPINGS

          public static final String SYNONYM_MAPPINGS

      See Also:
        Constant Field Values

    - #### IGNORE_CASE_INIT_ARG

          public static final String IGNORE_CASE_INIT_ARG

      See Also:
        Constant Field Values

    - #### delegate

          protected SynonymFilterFactory delegate

  - ### Constructor Detail

    - #### ManagedSynonymFilterFactory

          public ManagedSynonymFilterFactory(Map<String,String> args)

  - ### Method Detail

    - #### getResourceId

          public String getResourceId()

      Description copied from class: `BaseManagedTokenFilterFactory`
      Let the concrete analysis component decide the path it wishes to be managed at.
      Specified by:
        `getResourceId` in class `BaseManagedTokenFilterFactory`

    - #### getManagedResourceImplClass

          protected Class<? extends ManagedResource> getManagedResourceImplClass()

      Description copied from class: `BaseManagedTokenFilterFactory`
      Let the concrete analysis component determine the ManagedResource implementation. As there can be many instances of the same analysis component in a schema, this class should not presume to create ManagedResource. For instance, there may be 10 instances of the ManagedStopFilterFactory that use the same set of English stop words and we don't want 10 copies of the ManagedWordSetResource in the same core.
      Specified by:
        `getManagedResourceImplClass` in class `BaseManagedTokenFilterFactory`

    - #### onManagedResourceInitialized

          public void onManagedResourceInitialized(NamedList<?> initArgs,
                                                   ManagedResource res)
                                            throws SolrException

      Called once, during core initialization, to initialize any analysis components that depend on the data managed by this resource. It is important that the analysis component is only initialized once during core initialization so that text analysis is consistent, especially in a distributed environment, as we don't want one server applying a different set of stop words than other servers.
      Throws:
        `SolrException`

    - #### create

          public TokenStream create(TokenStream input)

      Specified by:
        `create` in class `TokenFilterFactory`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.