Search Index

Permalink
I am tasked with using elastic search for a c5 site I am working on. I would like to override Search Index so it will index content changes using elastic search instead of c5's index and search method. However I am having a difficult time trying to find where the method is that gets called by Search Index, does anyone know where this method is?

 
Justin1978 replied on at Permalink Reply
Justin1978
Having a quick glance at Concrete's code:

Indexing is done by an instance of Concrete\Core\Search\Index\IndexManagerInterface wich you will find in this folder: concrete\src\Search\Index.

If you look at the service provider \Concrete\Core\Search\SearchServiceProvider you can see that it is binded to the dependency container for Concrete\Core\Search\Index\DefaultManager.

So the DefaultManager is Concrete's search indexer. Looking for usages of IndexManagerInterface you will see it used in \Concrete\Job\IndexSearchAll class which is a cron job.

So if you want to implement Elastic Search then you have to write a class that implements the IndexManagerInterface interface and bind it in your own service provider so that it will override Concrete's binding.