We have lot of products in our Catalog. Our Search goes down when we do full indexing on solr. Any idea how to achieve this, so that site search is not interrupted while doing solr full index.
I found the solr index has two indexer mode: Direct and Two-Phase. Using Two-Phase solr indexing option in Hybris, I was able to do a solr full index without interrupting the search.
As per Hybris Wiki, there are two indexer mode:
DIRECT: In case of the full index operation, the current index is removed and replaced by a new index. For a certain period of time the index is not fully available for the users for query.
TWO_PHASE: The current index remains active until the new index has been built in the new Solr core. After that, new index takes place of the old index and can be queried by users without any shutdown periods. External front-end applications do not need to know which Solr indexer core is active at the current time.
Using two phase commit is only useful when using a single solr server or a cluster without the "use master exclusively for indexing" setting. Using two phase commit is mostly useful for small single node dev sandbox and CI/UAT testing installations.
Hybris Commerce manages a cluster of solr servers. For production and load testing deployments, use at least two, with one configured as a master, and each additional solr server configured as a slave. Configure the master (HMC/Management Backoffice checkbox "use master exclusively for indexing") to run as indexer only, preventing Hybris Commerce from searching on the master. Then run a full index to ensure all slaves are up to date.
The master/slave solr cluster setup Hybris commerce will send indexing jobs to the master (phase 1), and when they complete, it will connect to each slave and force it to download and apply the completed index (phase 2) from the master in a two-phase operation. This configuration isolates indexing load from search load almost completely. In addition to continuous search availability, this provides the ability to vertically scale the master to handle indexing workload while the slaves can be horizontally scaled to handle search load.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With