How to start solr server in hybris 5.7 in standalone mode?

Rajdeep Sahoo picture Rajdeep Sahoo · Mar 30, 2017 · Viewed 7.1k times · Source

Unable to start solr server in hybris 5.7 so search is not working . How to start solr server in hybris 5.7 in standalone mode.

Answer

HybrisHelp picture HybrisHelp · Apr 3, 2018

In addition to the fine answers above, let me mention all steps, which required to set up the standalone Solr server in SAP Hybris.

Prerequestion

  • solrserver extension should be there in your localextensions.xml file

Hybris OOTB Solr configuration background

The default configuration is as follows:

solrserver.instances.default.autostart=true
solrserver.instances.default.mode=standalone
solrserver.instances.default.hostname=localhost
solrserver.instances.default.port=8983
solrserver.instances.default.memory=512m

Here, you can see autostart=true which tell Solr server to start and stop together with the Hybris platform.


Setup external Standalone Server

We want to start/stop it independently from Hybris instance. To do so we need disables the autostart for the default Solr instance using below properties.

solrserver.instances.default.autostart=false

solrserver.instances.standalone.autostart=true
solrserver.instances.standalone.mode=standalone
solrserver.instances.standalone.hostname=localhost
solrserver.instances.standalone.port=8983
solrserver.instances.standalone.memory=512m

How to start/stop solr server

You can simply use ant commands to start and stop solr server

ant startSolrServer
ant stopSolrServer

Hybris OOTB, you can find solr setup at hybris/bin/ext-commerce/solrserver/resources/solr/. Now go to bin folder, there you can also run solr script manually as mentioned below.

Start the solr server

./solr start -p 8983    #Linux systems
solr.cmd start -p 8983  #Window system

Stop the solr server

./solr stop -p 8983    #Linux systems
solr.cmd stop -p 8983  #Window system

Find detail post here