Skip to content

Search refactoring

Anton Sudak requested to merge a.sudak/play-cms:sarch-refactoring into master

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 and CMSApi classes dropped getSearchManager 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 from SearchProviderModule and use mentioned method in configure() 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 static ConcurrentQueue 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.
Edited by Anton Sudak

Merge request reports