public class DefaultSharedEntityIndexer extends Object implements SharedEntityIndexer
Modifier and Type | Class and Description |
---|---|
static interface |
DefaultSharedEntityIndexer.EntityDocument
Holds a
Document and an identifying Term so we can delete any pre-existing document. |
static interface |
DefaultSharedEntityIndexer.EntityDocumentFactory |
Constructor and Description |
---|
DefaultSharedEntityIndexer(ShareTypeFactory shareTypeFactory,
SharedEntitySearchContextToQueryFactoryMap searchContextToQueryFactoryMap,
SharedEntityAccessor.Factory accessorFactory,
DirectoryFactory directoryFactory,
UserManager userManager,
ReplicatedIndexManager replicatedIndexManager,
ApplicationProperties applicationProperties) |
Modifier and Type | Method and Description |
---|---|
String |
clear(SharedEntity.TypeDescriptor<?> type)
Clear a particular type's index.
|
Index.Result |
deIndex(Set<SharedEntity> sharedEntities,
boolean updateReplicatedIndex)
Delete multiple documents in the index
|
Index.Result |
deIndex(SharedEntity entity)
Delete a document from the index.
|
Collection<String> |
getAllIndexPaths() |
<S extends SharedEntity> |
getSearcher(SharedEntity.TypeDescriptor<S> type)
Get a SharedEntitySearcher for the specified
SharedEntity.TypeDescriptor |
Index.Result |
index(Set<SharedEntity> sharedEntities,
boolean updateReplicatedIndex)
Add or update multiple documents in the index
|
Index.Result |
index(SharedEntity entity)
Add or update a document in the index.
|
Index.Result |
index(SharedEntity entity,
boolean updateReplicatedIndex)
Add or update a document in the index.
|
long |
optimize(SharedEntity.TypeDescriptor<?> type)
Optimize a particular type's index.
|
void |
recreate(SharedEntity.TypeDescriptor<?> type)
Recreate the index.
|
void |
shutdown(SharedEntity.TypeDescriptor<?> type)
Shutdown a particular type's index.
|
public DefaultSharedEntityIndexer(ShareTypeFactory shareTypeFactory, SharedEntitySearchContextToQueryFactoryMap searchContextToQueryFactoryMap, SharedEntityAccessor.Factory accessorFactory, DirectoryFactory directoryFactory, UserManager userManager, ReplicatedIndexManager replicatedIndexManager, ApplicationProperties applicationProperties)
public Index.Result index(SharedEntity entity)
SharedEntityIndexer
index
in interface SharedEntityIndexer
entity
- the entity to add to the indexpublic Index.Result deIndex(SharedEntity entity)
SharedEntityIndexer
deIndex
in interface SharedEntityIndexer
entity
- the entity to remove from the indexpublic Index.Result index(SharedEntity entity, boolean updateReplicatedIndex)
SharedEntityIndexer
index
in interface SharedEntityIndexer
entity
- the entity to add to the indexupdateReplicatedIndex
- whether to update the replicated index or notpublic Index.Result index(Set<SharedEntity> sharedEntities, boolean updateReplicatedIndex)
SharedEntityIndexer
index
in interface SharedEntityIndexer
sharedEntities
- a Set of entities to add to the indexupdateReplicatedIndex
- whether to update the replicated index or notpublic Index.Result deIndex(Set<SharedEntity> sharedEntities, boolean updateReplicatedIndex)
SharedEntityIndexer
deIndex
in interface SharedEntityIndexer
sharedEntities
- a Set of entities to remove from the indexupdateReplicatedIndex
- whether to update the replicated index or notpublic <S extends SharedEntity> SharedEntitySearcher<S> getSearcher(SharedEntity.TypeDescriptor<S> type)
SharedEntityIndexer
SharedEntity.TypeDescriptor
getSearcher
in interface SharedEntityIndexer
type
- the index to use when searchingpublic long optimize(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
optimize
in interface SharedEntityIndexer
type
- describes the particular indexpublic String clear(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
clear
in interface SharedEntityIndexer
type
- describes the particular indexpublic void recreate(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
recreate
in interface SharedEntityIndexer
public void shutdown(SharedEntity.TypeDescriptor<?> type)
SharedEntityIndexer
shutdown
in interface SharedEntityIndexer
type
- describes the particular indexpublic Collection<String> getAllIndexPaths()
getAllIndexPaths
in interface SharedEntityIndexer
Copyright © 2002-2017 Atlassian. All Rights Reserved.