Class TurSearchEnginePluginFactory
java.lang.Object
com.viglet.turing.plugins.se.TurSearchEnginePluginFactory
Factory for creating and selecting search engine plugins based on configuration.
- Since:
- 2025.4.4
- Author:
- Alexandre Oliveira
-
Constructor Summary
ConstructorsConstructorDescriptionTurSearchEnginePluginFactory(List<TurSearchEnginePlugin> plugins, String defaultEngineType) -
Method Summary
Modifier and TypeMethodDescriptionGets the default engine type configured.Gets the configured default search engine plugin.Gets a specific search engine plugin by type.
-
Constructor Details
-
TurSearchEnginePluginFactory
public TurSearchEnginePluginFactory(List<TurSearchEnginePlugin> plugins, @Value("${turing.search.engine.type:solr}") String defaultEngineType)
-
-
Method Details
-
getDefaultPlugin
Gets the configured default search engine plugin.- Returns:
- the default search engine plugin
- Throws:
IllegalStateException- if the configured plugin is not found
-
getPlugin
Gets a specific search engine plugin by type.- Parameters:
engineType- the type of search engine (e.g., "solr", "elasticsearch")- Returns:
- the search engine plugin
- Throws:
IllegalStateException- if the plugin is not found
-
getDefaultEngineType
Gets the default engine type configured.- Returns:
- the default engine type
-