Class ManagedWordSetResource

java.lang.Object
org.apache.solr.rest.ManagedResource
org.apache.solr.rest.schema.analysis.ManagedWordSetResource
All Implemented Interfaces:
ManagedResource.ChildResourceSupport

public class ManagedWordSetResource extends ManagedResource implements ManagedResource.ChildResourceSupport
ManagedResource implementation for managing a set of words using the REST API; useful for managing stop words and/or protected words for analysis components like the KeywordMarkerFilter.
  • Field Details

  • Constructor Details

  • Method Details

    • getWordSet

      public Set<String> getWordSet()
      Returns the set of words in this managed word set.
    • getIgnoreCase

      public boolean getIgnoreCase()
      Returns the boolean value of the IGNORE_CASE_INIT_ARG init arg, or the default value (false) if it has not been specified
    • getIgnoreCase

      public boolean getIgnoreCase(org.apache.solr.common.util.NamedList<?> initArgs)
      Returns the boolean value of the IGNORE_CASE_INIT_ARG init arg, or the default value (false) if it has not been specified
    • onManagedDataLoadedFromStorage

      protected void onManagedDataLoadedFromStorage(org.apache.solr.common.util.NamedList<?> initArgs, Object data) throws org.apache.solr.common.SolrException
      Invoked when loading data from storage to initialize the list of words managed by this instance. A load of the data can happen many times throughout the life cycle of this object.
      Specified by:
      onManagedDataLoadedFromStorage in class ManagedResource
      Throws:
      org.apache.solr.common.SolrException
    • doGet

      public void doGet(BaseSolrResource endpoint, String childId)
      Implements the GET request to provide the list of words to the client. Alternatively, if a specific word is requested, then it is returned or a 404 is raised, indicating that the requested word does not exist.
      Specified by:
      doGet in class ManagedResource
    • doDeleteChild

      public void doDeleteChild(BaseSolrResource endpoint, String childId)
      Deletes words managed by this resource.
      Specified by:
      doDeleteChild in class ManagedResource
    • applyUpdatesToManagedData

      protected Object applyUpdatesToManagedData(Object updates)
      Applies updates to the word set being managed by this resource.
      Specified by:
      applyUpdatesToManagedData in class ManagedResource
    • updateInitArgs

      protected boolean updateInitArgs(org.apache.solr.common.util.NamedList<?> updatedArgs)
      Description copied from class: ManagedResource
      Called from ManagedResource.doPut(BaseSolrResource,Object) to update this resource's init args using the given updatedArgs
      Overrides:
      updateInitArgs in class ManagedResource