org.xwiki.search.solr.internal.api
Interface SolrConfiguration

All Known Implementing Classes:
DefaultSolrConfiguration

@Role
public interface SolrConfiguration

Provides configuration for Solr.

Since:
4.5M1

Method Summary
 Map<String,URL> getHomeDirectoryConfiguration()
          Retrieves the the configuration files required by the Solr instance's home directory in order to initialize.
<T> T
getInstanceConfiguration(String instanceType, String propertyName, T defaultValue)
           
 List<String> getMultilingualFields()
           
 List<String> getOptimizableLanguages()
          Each language has its particularities and needs to be handled specially in order to index and retrieve the best results.
 List<String> getOptimizedLanguages()
          Each language has its particularities and needs to be handled specially in order to index and retrieve the best results.
 String getServerType()
           
 

Method Detail

getServerType

String getServerType()
Returns:
the type of Solr server used. Supported values: "embedded" or "remote".

getInstanceConfiguration

<T> T getInstanceConfiguration(String instanceType,
                               String propertyName,
                               T defaultValue)
Type Parameters:
T - the type of the default parameter.
Parameters:
instanceType - the instance type value for which configuration is requested.
propertyName - the name of the configuration property that is requested.
defaultValue - the default value to return if the requested value is not set.
Returns:
the instance specific configuration value.

getOptimizableLanguages

List<String> getOptimizableLanguages()
Each language has its particularities and needs to be handled specially in order to index and retrieve the best results.

Returns:
the list of supported language codes for which optimized indexing can be performed (using language-code-suffixed fields that are analyzed and queries with the analysis chain specific to the language).
See Also:
for the selected languages.

getOptimizedLanguages

List<String> getOptimizedLanguages()
Each language has its particularities and needs to be handled specially in order to index and retrieve the best results.

Returns:
the list of language codes for which to perform optimized indexing (using language-code-suffixed fields that are analyzed and queries with the analysis chain specific to the language).
See Also:
for the full list of supported languages.

getMultilingualFields

List<String> getMultilingualFields()
Returns:
the list of multilingual fields for which to apply optimized indexing.

getHomeDirectoryConfiguration

Map<String,URL> getHomeDirectoryConfiguration()
Retrieves the the configuration files required by the Solr instance's home directory in order to initialize.

Returns:
a map of (fileName, fileURL) to be used to initialize the Solr instance.