cancel
Showing results for 
Search instead for 
Did you mean: 

Manual for standalone solr index

Former Member
0 Kudos

Hi, is there a detailed manual for changing the solr indexing from embedded into standalone for hybris 5.4?

Rg, John

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Unfortunately not... but it can be done quite easily by impex, or if you're just testing you can do it in the hMC.

Here's an impex example I did a while ago. It actually supports both embedded and standalone, depending on a configuration property "solr.standlone.mode". So you can use it for dev and prod.

 enter code here#% if: Config.getBoolean("solr.standlone.mode", false) == false
 INSERT_UPDATE SolrServerConfig;name[unique=true];mode(code)[forceWrite=true];embeddedMaster
 ;$serverConfigName;embedded;true
 #% endif:
  
 #% if: Config.getBoolean("solr.standlone.mode", false) == true
 INSERT_UPDATE SolrServerConfig;name[unique=true];mode(code)[forceWrite=true];embeddedMaster;useMasterNodeExclusivelyForIndexing
 ;$serverConfigName;standalone;false;false
 #endpoints
  
 INSERT_UPDATE SolrEndpointUrl;solrServerConfig(name)[unique=true];url[unique=true];master[unique=true,default=false]
 #% beforeEach: line.put(2, Config.getParameter("solr.master.endpoint.url"))
 ;$serverConfigName;;true
 #% beforeEach: end
 #% if: org.apache.commons.lang.StringUtils.isNotEmpty(Config.getParameter("solr.slave.endpoint.url"))
 #% beforeEach: line.put(2, Config.getParameter("solr.slave.endpoint.url"))
 ;$serverConfigName
 #% beforeEach: end
 #% endif:
  
 #% endif:
Former Member
0 Kudos

Hi Matt, thanks for that. But I would like to it rather manually. Does this change only the new location of the index files or is this rather seperating the complete solr- process out of the hybris-server? I found a lot info about how to separate the index files into another server only. But I could not really find information about seperating the whole solr-process out of the hybris-server. I need to do it because of performance issues.

Former Member
0 Kudos

If you want to do it manually, you need to install Solr somewhere else, I think this is documented in the wiki, but easiest way is to zip the whole Solr part of the extension,

hybris/bin/ext-commerce/solrserver/resources/solr

You can then unzip that on another server, then you just create a standalone configuration in hmc or backoffice that points to your new server. You can copy over the index files, but it's probably not worth the effort, you can just reindex.

Former Member
0 Kudos

Within HMC the Solr Server Mode cannot be changed, its greyed out. Do you have any steps for HMC for standalone solr indexing? I am not also sure where to put the remote server IP where the index files are located.

Former Member
0 Kudos

hybris won't let you change it, you can create a new one, or, you can change it manually in the database (not recommended but it works).

Former Member
0 Kudos

Even I try to create a new one the field for standalone/ embedded are greyed out. I will have a look in the DB so...