public class CollectionManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CollectionManager.IdPathCheckUpdateStrategy |
static class |
CollectionManager.IdValidatingUpdateStrategy |
static class |
CollectionManager.PipelineCreatingUpdateStrategy |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CATCH_ALL_FIELD |
static java.lang.String |
RAW_CONTENT_FIELD_NAME |
| Constructor and Description |
|---|
CollectionManager(CollectionStore collectionStore,
SearchClusterComponent searchClusterComponent,
FeatureStore featureStore,
com.lucidworks.apollo.call.CallFactory callFactory,
ConfigurationComponent config,
ClientComponent clientComponent,
InterProcessLockFactory lockFactory,
com.lucidworks.apollo.links.LinkManager linkManager) |
| Modifier and Type | Method and Description |
|---|---|
InterProcessLockFactory.ClosableLock |
acquireLockOnCollection(java.lang.String collectionId) |
boolean |
collectionExists(java.lang.String collectionId) |
void |
configureCollectionLayout(com.lucidworks.apollo.common.models.Collection collection,
java.lang.String clusterName,
org.apache.commons.configuration.Configuration... configs)
Configures the numShards, replicationFactor, and maxShardsPerNodes parameters for creating a collection
based on configuration settings and the cluster size.
|
<any> |
createCollection(com.lucidworks.apollo.common.models.Collection collection)
Deprecated.
|
<any> |
createCollection(com.lucidworks.apollo.common.models.Collection collection,
boolean createDefaultPipelines)
Deprecated.
|
<any> |
createSystemCollection(com.lucidworks.apollo.common.models.Collection collection,
com.lucidworks.apollo.common.models.Collection.CollectionType collectionType,
java.lang.String searchClusterConfigPrefix,
java.lang.String configPrefix,
java.util.List<java.lang.String> features,
boolean createPipelines,
Configuration userConfiguration)
Handles a lot of the boilerplate for creating system collections: looking up search cluster and collection layout
based on properties, optionally enabling features, and so on.
|
void |
deleteCollection(java.lang.String collectionId,
boolean deleteFromSolr,
boolean purge,
boolean deletePipelines,
int version) |
<any> |
getCollection(java.lang.String collectionId) |
java.util.List<com.lucidworks.apollo.common.models.Collection> |
getCollections() |
com.lucidworks.apollo.component.crud.UpdateBuilder<com.lucidworks.apollo.common.models.Collection> |
getCreateBuilder() |
com.lucidworks.apollo.component.crud.DeleteBuilder |
getDeleteBuilder(boolean deleteFromSolr,
boolean purge,
boolean deletePipelines) |
com.lucidworks.apollo.component.crud.ListBuilder<com.lucidworks.apollo.common.models.Collection> |
getListBuilder() |
com.lucidworks.apollo.component.crud.ReadBuilder<com.lucidworks.apollo.common.models.Collection> |
getReadBuilder() |
com.lucidworks.apollo.component.crud.UpdateBuilder<com.lucidworks.apollo.common.models.Collection> |
getUpdateBuilder(java.lang.String collectionId) |
<any> |
overwriteCollection(java.lang.String collectionId,
int version,
com.lucidworks.apollo.common.models.Collection collection) |
void |
runCallbackForFeature(com.lucidworks.apollo.common.models.CallParams callParams,
com.lucidworks.apollo.common.models.Feature feature) |
public static final java.lang.String RAW_CONTENT_FIELD_NAME
public static final java.lang.String CATCH_ALL_FIELD
public CollectionManager(CollectionStore collectionStore, SearchClusterComponent searchClusterComponent, FeatureStore featureStore, com.lucidworks.apollo.call.CallFactory callFactory, ConfigurationComponent config, ClientComponent clientComponent, InterProcessLockFactory lockFactory, com.lucidworks.apollo.links.LinkManager linkManager)
public java.util.List<com.lucidworks.apollo.common.models.Collection> getCollections()
public <any> getCollection(java.lang.String collectionId)
@Deprecated
public <any> createCollection(com.lucidworks.apollo.common.models.Collection collection)
throws com.lucidworks.apollo.common.error.RESTError
collection - com.lucidworks.apollo.common.error.RESTErrorcreateCollection(Collection, boolean)@Deprecated
public <any> createCollection(com.lucidworks.apollo.common.models.Collection collection,
boolean createDefaultPipelines)
throws com.lucidworks.apollo.common.error.RESTError
createCollection(Collection) are not called by CollectionResource.collection - createDefaultPipelines - com.lucidworks.apollo.common.error.RESTErrorpublic <any> overwriteCollection(java.lang.String collectionId,
int version,
com.lucidworks.apollo.common.models.Collection collection)
throws com.lucidworks.apollo.common.error.RESTError
com.lucidworks.apollo.common.error.RESTErrorpublic com.lucidworks.apollo.component.crud.ListBuilder<com.lucidworks.apollo.common.models.Collection> getListBuilder()
public com.lucidworks.apollo.component.crud.ReadBuilder<com.lucidworks.apollo.common.models.Collection> getReadBuilder()
public com.lucidworks.apollo.component.crud.UpdateBuilder<com.lucidworks.apollo.common.models.Collection> getCreateBuilder()
public com.lucidworks.apollo.component.crud.UpdateBuilder<com.lucidworks.apollo.common.models.Collection> getUpdateBuilder(java.lang.String collectionId)
public com.lucidworks.apollo.component.crud.DeleteBuilder getDeleteBuilder(boolean deleteFromSolr,
boolean purge,
boolean deletePipelines)
public boolean collectionExists(java.lang.String collectionId)
public <any> createSystemCollection(com.lucidworks.apollo.common.models.Collection collection,
com.lucidworks.apollo.common.models.Collection.CollectionType collectionType,
java.lang.String searchClusterConfigPrefix,
java.lang.String configPrefix,
java.util.List<java.lang.String> features,
boolean createPipelines,
Configuration userConfiguration)
throws com.lucidworks.apollo.common.error.RESTError
collection - note that this argument may be modified, based on configuration.collectionType - the collectionType to set on the above collection. Called out specifically to make sure people set it.searchClusterConfigPrefix - configPrefix - features - createPipelines - userConfiguration - com.lucidworks.apollo.common.error.RESTErrorpublic void deleteCollection(java.lang.String collectionId,
boolean deleteFromSolr,
boolean purge,
boolean deletePipelines,
int version)
throws com.lucidworks.apollo.common.error.RESTError
com.lucidworks.apollo.common.error.RESTErrorpublic void runCallbackForFeature(com.lucidworks.apollo.common.models.CallParams callParams,
com.lucidworks.apollo.common.models.Feature feature)
throws com.lucidworks.apollo.common.error.RESTError
com.lucidworks.apollo.common.error.RESTErrorpublic void configureCollectionLayout(com.lucidworks.apollo.common.models.Collection collection,
java.lang.String clusterName,
org.apache.commons.configuration.Configuration... configs)
throws com.lucidworks.apollo.common.error.RESTError
collection - clusterName - configs - com.lucidworks.apollo.common.error.RESTErrorpublic InterProcessLockFactory.ClosableLock acquireLockOnCollection(java.lang.String collectionId) throws java.lang.Exception
java.lang.Exception