Interface CustomSearchIndexRegistry
- 
- All Known Implementing Classes:
 DefaultCustomSearchIndexRegistry,OpenSearchCustomSearchIndexRegistry
public interface CustomSearchIndexRegistryThis interface is available to plugins and allows 3rd-party vendors to add their own custom indexes- Since:
 - 7.17
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default SearchIndexAccessoradd(String name, @Nullable AnalyzerDescriptorProvider analyzerDescriptorProvider)This method can be called multiple times but a newSearchIndexAccessorinstance will be created only once for the first call.default SearchIndexAccessoradd(String name, ScoringStrategy scoringStrategy, @Nullable AnalyzerDescriptorProvider analyzerDescriptorProvider)Deprecated.since 8.7.0 useadd(String, AnalyzerDescriptorProvider)SearchIndexAccessoradd(String name, String relativeIndexPath, ScoringStrategy scoringStrategy, @Nullable AnalyzerDescriptorProvider analyzerDescriptorProvider)Deprecated.since 8.6.0 useadd(String, ScoringStrategy, AnalyzerDescriptorProvider)SearchIndexAccessorget(String name)This method returns theSearchIndexAccessorcorresponding to the index represented by its unique name.voidremove(String name)Remove the custom index from the registry. 
 - 
 
- 
- 
Method Detail
- 
add
@Deprecated SearchIndexAccessor add(String name, String relativeIndexPath, ScoringStrategy scoringStrategy, @Nullable AnalyzerDescriptorProvider analyzerDescriptorProvider) throws SearchIndexAccessException
Deprecated.since 8.6.0 useadd(String, ScoringStrategy, AnalyzerDescriptorProvider)This method can be called multiple times but a newSearchIndexAccessorinstance will be created only once for the first call. The same instance will be returned by subsequent calls to the method with the same name.It is highly recommended that the prefix
nameandrelativeIndexPathare prefixed with the plugin key to avoid naming conflicts and/or unintentionally sharing indexes with another plugin.- Parameters:
 name- the unique name of the custom index. The name should have a plugin key as its prefix to avoid naming conflicts. If the custom index directory is not created, it will be created under the default index directory.relativeIndexPath- the path relative to the confluence lucene index directory expressed as a String. You must use forward slashes as separators i.e. plugin/usage. Underlying impl is filesystem independent.scoringStrategy- the scoring strategy that will be used to scan the documents.analyzerDescriptorProvider- provider for aMappingAnalyzerDescriptorrepresenting a Lucene Analyzer, or null ifKeywordAnalyzeris used.- Returns:
 - a 
SearchIndexAccessorthat can access to this custom index. - Throws:
 SearchIndexAccessException
 
- 
add
@Deprecated default SearchIndexAccessor add(String name, ScoringStrategy scoringStrategy, @Nullable AnalyzerDescriptorProvider analyzerDescriptorProvider) throws SearchIndexAccessException
Deprecated.since 8.7.0 useadd(String, AnalyzerDescriptorProvider)This method can be called multiple times but a newSearchIndexAccessorinstance will be created only once for the first call. The same instance will be returned by subsequent calls to the method with the same name.It is highly recommended that the
nameis prefixed with the plugin key to avoid naming conflicts and/or unintentionally sharing indexes with another plugin.- Parameters:
 name- the unique name of the custom index. The name should have a plugin key as its prefix to avoid naming conflicts.scoringStrategy- the scoring strategy that will be used to scan the documents.analyzerDescriptorProvider- provider for aMappingAnalyzerDescriptorrepresenting a Lucene Analyzer, or null ifKeywordAnalyzeris used.- Returns:
 - a 
SearchIndexAccessorthat can access to this custom index. - Throws:
 SearchIndexAccessException
 
- 
add
default SearchIndexAccessor add(String name, @Nullable AnalyzerDescriptorProvider analyzerDescriptorProvider) throws SearchIndexAccessException
This method can be called multiple times but a newSearchIndexAccessorinstance will be created only once for the first call. The same instance will be returned by subsequent calls to the method with the same name.It is highly recommended that the
nameis prefixed with the plugin key to avoid naming conflicts and/or unintentionally sharing indexes with another plugin.- Parameters:
 name- the unique name of the custom index. The name should have a plugin key as its prefix to avoid naming conflicts.analyzerDescriptorProvider- provider for aMappingAnalyzerDescriptorrepresenting a Lucene Analyzer, or null ifKeywordAnalyzeris used.- Returns:
 - a 
SearchIndexAccessorthat can access to this custom index. - Throws:
 SearchIndexAccessException
 
- 
get
SearchIndexAccessor get(String name) throws SearchIndexAccessException
This method returns theSearchIndexAccessorcorresponding to the index represented by its unique name.- Parameters:
 name- the name of the custom index- Returns:
 - a 
SearchIndexAccessorthat can access to this custom index - Throws:
 SearchIndexAccessException- if the custom search index does not exist
 
- 
remove
void remove(String name) throws SearchIndexAccessException
Remove the custom index from the registry. The internal lucene connection will be also closed.- Parameters:
 name- the name of the custom index- Throws:
 SearchIndexAccessException- if the custom search index does not exist
 
 - 
 
 -