com.atlassian.jira.sharing.index
Interface SharedEntityIndexer

All Known Implementing Classes:
DefaultSharedEntityIndexer

public interface SharedEntityIndexer

Responsible for actually indexing a SharedEntity.

Since:
v3.13

Method Summary
 String clear(SharedEntity.TypeDescriptor<?> type)
          Clear a particular type's index.
 Index.Result deIndex(SharedEntity entity)
          Delete a document from the index.
 Collection<String> getAllIndexPaths()
           
<S extends SharedEntity>
SharedEntitySearcher<S>
getSearcher(SharedEntity.TypeDescriptor<S> type)
          Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor
 Index.Result index(SharedEntity entity)
          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.
 

Method Detail

index

Index.Result index(SharedEntity entity)
Add or update a document in the index.

Parameters:
entity - the entity to add to the index

deIndex

Index.Result deIndex(SharedEntity entity)
Delete a document from the index.

Parameters:
entity - the entity to remove from the index

getSearcher

<S extends SharedEntity> SharedEntitySearcher<S> getSearcher(SharedEntity.TypeDescriptor<S> type)
Get a SharedEntitySearcher for the specified SharedEntity.TypeDescriptor

Parameters:
type - the index to use when searching
Returns:
searcher for searching

optimize

long optimize(SharedEntity.TypeDescriptor<?> type)
Optimize a particular type's index.

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

shutdown

void shutdown(SharedEntity.TypeDescriptor<?> type)
Shutdown a particular type's index.

Parameters:
type - describes the particular index

clear

String clear(SharedEntity.TypeDescriptor<?> type)
Clear a particular type's index. Return the path.

Parameters:
type - describes the particular index

getAllIndexPaths

Collection<String> getAllIndexPaths()
Returns:
all the paths where the indexes are

recreate

void recreate(SharedEntity.TypeDescriptor<?> type)
Recreate the index. Clear it if it currently exists, create a new one if it doesn't.



Copyright © 2002-2012 Atlassian. All Rights Reserved.