org.apache.solr.rest.schema.analysis

## Class ManagedStopFilterFactory

- 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.ManagedStopFilterFactory

- All Implemented Interfaces:
    ResourceLoaderAware, ManagedResourceObserver

      public class ManagedStopFilterFactory
      extends BaseManagedTokenFilterFactory

  TokenFilterFactory that uses the ManagedWordSetResource implementation for managing stop words using the REST API.

- - ### Field Summary

    - ### 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
    `ManagedStopFilterFactory(Map<String,String> args)` Initialize the managed "handle"

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TokenStream` | `create(TokenStream input)` Returns a StopFilter based on our managed stop word set.
    `protected Class<? extends ManagedResource>` | `getManagedResourceImplClass()` Returns the implementation class for managing stop words.
    `String` | `getResourceId()` This analysis component knows the most logical "path" for which to manage stop words from.
    `void` | `onManagedResourceInitialized(NamedList<?> args, ManagedResource res)` Callback invoked by the `ManagedResource` instance to trigger this class to create the CharArraySet used to create the StopFilter using the wordset managed by `ManagedWordSetResource`.

    - ### 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`

- - ### Constructor Detail

    - #### ManagedStopFilterFactory

          public ManagedStopFilterFactory(Map<String,String> args)

      Initialize the managed "handle"

  - ### Method Detail

    - #### getResourceId

          public String getResourceId()

      This analysis component knows the most logical "path" for which to manage stop words from.
      Specified by:
        `getResourceId` in class `BaseManagedTokenFilterFactory`

    - #### getManagedResourceImplClass

          protected Class<? extends ManagedResource> getManagedResourceImplClass()

      Returns the implementation class for managing stop words.
      Specified by:
        `getManagedResourceImplClass` in class `BaseManagedTokenFilterFactory`

    - #### onManagedResourceInitialized

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

      Callback invoked by the `ManagedResource` instance to trigger this class to create the CharArraySet used to create the StopFilter using the wordset managed by `ManagedWordSetResource`. Keep in mind that a schema.xml may reuse the same `ManagedStopFilterFactory` many times for different field types; behind the scenes all instances of this class/handle combination share the same managed data, hence the need for a listener/callback scheme.
      Throws:
        `SolrException`

    - #### create

          public TokenStream create(TokenStream input)

      Returns a StopFilter based on our managed stop word set.
      Specified by:
        `create` in class `TokenFilterFactory`

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