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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.solr.rest.ManagedResource
ManagedResource.ChildResourceSupport -
Field Summary
FieldsFields inherited from class org.apache.solr.rest.ManagedResource
INIT_ARGS_JSON_FIELD, INITIALIZED_ON_JSON_FIELD, initializedOn, lastUpdateSinceInitialization, MANAGED_JSON_LIST_FIELD, MANAGED_JSON_MAP_FIELD, managedInitArgs, solrResourceLoader, storage, UPDATED_SINCE_INIT_JSON_FIELD -
Constructor Summary
ConstructorsConstructorDescriptionManagedWordSetResource(String resourceId, SolrResourceLoader loader, ManagedResourceStorage.StorageIO storageIO) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectapplyUpdatesToManagedData(Object updates) Applies updates to the word set being managed by this resource.voiddoDeleteChild(BaseSolrResource endpoint, String childId) Deletes words managed by this resource.voiddoGet(BaseSolrResource endpoint, String childId) Implements the GET request to provide the list of words to the client.booleanReturns the boolean value of theIGNORE_CASE_INIT_ARGinit arg, or the default value (false) if it has not been specifiedbooleangetIgnoreCase(org.apache.solr.common.util.NamedList<?> initArgs) Returns the boolean value of theIGNORE_CASE_INIT_ARGinit arg, or the default value (false) if it has not been specifiedReturns the set of words in this managed word set.protected voidonManagedDataLoadedFromStorage(org.apache.solr.common.util.NamedList<?> initArgs, Object data) Invoked when loading data from storage to initialize the list of words managed by this instance.protected booleanupdateInitArgs(org.apache.solr.common.util.NamedList<?> updatedArgs) Called fromManagedResource.doPut(BaseSolrResource,Object)to update this resource's init args using the given updatedArgsMethods inherited from class org.apache.solr.rest.ManagedResource
buildMapToStore, convertNamedListToMap, createStorage, doPost, doPut, getInitializedOn, getResourceId, getResourceLoader, getServerResourceClass, getUpdatedSinceInitialization, hasChangesSinceInitialization, loadManagedDataAndNotify, notifyObserversDuringInit, onResourceDeleted, processStoredData, reloadFromStorage, storeManagedData
-
Field Details
-
WORD_SET_JSON_FIELD
- See Also:
-
IGNORE_CASE_INIT_ARG
- See Also:
-
-
Constructor Details
-
ManagedWordSetResource
public ManagedWordSetResource(String resourceId, SolrResourceLoader loader, ManagedResourceStorage.StorageIO storageIO) throws org.apache.solr.common.SolrException - Throws:
org.apache.solr.common.SolrException
-
-
Method Details
-
getWordSet
Returns the set of words in this managed word set. -
getIgnoreCase
public boolean getIgnoreCase()Returns the boolean value of theIGNORE_CASE_INIT_ARGinit 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 theIGNORE_CASE_INIT_ARGinit 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:
onManagedDataLoadedFromStoragein classManagedResource- Throws:
org.apache.solr.common.SolrException
-
doGet
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:
doGetin classManagedResource
-
doDeleteChild
Deletes words managed by this resource.- Specified by:
doDeleteChildin classManagedResource
-
applyUpdatesToManagedData
Applies updates to the word set being managed by this resource.- Specified by:
applyUpdatesToManagedDatain classManagedResource
-
updateInitArgs
protected boolean updateInitArgs(org.apache.solr.common.util.NamedList<?> updatedArgs) Description copied from class:ManagedResourceCalled fromManagedResource.doPut(BaseSolrResource,Object)to update this resource's init args using the given updatedArgs- Overrides:
updateInitArgsin classManagedResource
-