Search refactoring
THis MR introduces few improvement into a Search mechanisms of the play-cms.
-
SearchManager
is now injectable and could be used directly to access search providers -
CMS
andCMSApi
classes droppedgetSearchManager
method in order to prevent circular dependencies. - registration of search providers was overhauled: we utilize guice multibindings extension in order to create list of the registered providers on initialization time. THis allow us to create pluggable search providers.
in order to create such pluggable search provider it should be registered via
ch.insign.commons.SearchProviderModule#bindSearchProvider
method. Just extend your guice module fromSearchProviderModule
and use mentioned method inconfigure()
definition. -
ElasticSearchProvider
was updated to play nice with the latest elasticsearch API. -
ElasticSearchProvider
also utilizes akka actor as a queue manager instead of relying on the staticConcurrentQueue
field. -
BackendItemLink
was marked as unsearchable in order to prevent search providers from trying to access backend pages
Things that would be nice to have in future:
- Hide search providers from the user and use
SearchManager
as a generalized facade for all actions. This would allow us to remove duplicating code like populating queue or retrieving pages from the search provides and make them slim.