on 04-29-2016 3:22 PM
Hi, is there a detailed manual for changing the solr indexing from embedded into standalone for hybris 5.4?
Rg, John
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.