public interface

SharedEntityIndexer

com.atlassian.jira.sharing.index.SharedEntityIndexer
Known Indirect Subclasses

Class Overview

Responsible for actually indexing a SharedEntity.

Summary

Public Methods
String clear(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> SharedEntitySearcher<S> getSearcher(TypeDescriptor<S> type)
Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor
Index.Result index(SharedEntity entity)
Add or update a document in the index.
Index.Result index(Set<SharedEntity> sharedEntities, boolean updateReplicatedIndex)
Add or update multiple documents in the index
Index.Result index(SharedEntity entity, boolean updateReplicatedIndex)
Add or update a document in the index.
long optimize(TypeDescriptor<?> type)
Optimize a particular type's index.
void recreate(TypeDescriptor<?> type)
Recreate the index.
void shutdown(TypeDescriptor<?> type)
Shutdown a particular type's index.

Public Methods

public String clear (TypeDescriptor<?> type)

Clear a particular type's index. Return the path.

Parameters
type describes the particular index

public Index.Result deIndex (Set<SharedEntity> sharedEntities, boolean updateReplicatedIndex)

Delete multiple documents in the index

Parameters
sharedEntities a Set of entities to remove from the index
updateReplicatedIndex whether to update the replicated index or not

public Index.Result deIndex (SharedEntity entity)

Delete a document from the index.

Parameters
entity the entity to remove from the index

public Collection<String> getAllIndexPaths ()

Returns
  • all the paths where the indexes are

public SharedEntitySearcher<S> getSearcher (TypeDescriptor<S> type)

Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor

Parameters
type the index to use when searching
Returns
  • searcher for searching

public Index.Result index (SharedEntity entity)

Add or update a document in the index.

Parameters
entity the entity to add to the index

public Index.Result index (Set<SharedEntity> sharedEntities, boolean updateReplicatedIndex)

Add or update multiple documents in the index

Parameters
sharedEntities a Set of entities to add to the index
updateReplicatedIndex whether to update the replicated index or not

public Index.Result index (SharedEntity entity, boolean updateReplicatedIndex)

Add or update a document in the index.

Parameters
entity the entity to add to the index
updateReplicatedIndex whether to update the replicated index or not

public long optimize (TypeDescriptor<?> type)

Optimize a particular type's index.

Parameters
type describes the particular index
Returns
  • the number of milliseconds taken to optimize

public void recreate (TypeDescriptor<?> type)

Recreate the index. Clear it if it currently exists, create a new one if it doesn't.

public void shutdown (TypeDescriptor<?> type)

Shutdown a particular type's index.

Parameters
type describes the particular index