Posts

Hybris flexible search query examples

Use of Enum in the query Find all running Solr Index jobs select {cj.code},{enum:code},{cj.startTime},{cj.endTime} from { SolrIndexerCronJob! as cj join EnumerationValue as enum on {cj.status}={enum.pk} } where {enum:code} = 'RUNNING' Compare Date in the flexiblesearch query Find all running Solr Index jobs from the given date select {cj.code},{enum:code},{cj.startTime},{cj.endTime} from { SolrIndexerCronJob! as cj join EnumerationValue as enum on {cj.status}={enum.pk} } where {enum:code} = 'RUNNING' and {cj.startTime} >= TO_DATE('2021/12/25','YYYY/MM/DD') Basic  JOIN  and  IN  query Get the most recent order for each customer using flexible search. select {o.code} as orderCode, {c.name} as name, {a.cellphone} as cellphone from {order as o join Customer as c on {c.pk} = {o.user} join Address as a on {o.deliveryaddress} = {a.pk} } where {o.code} in ({{select max({cod

[Solved] Solr error while hybris server startup

Scenario Getting  error creating a bean with name 'defaultSolrServerService' , while Hybris server startup? Error creating bean with name 'defaultSolrServerService' defined in class path resource [global-solrserver-spring.xml]: Invocation of init method fa ing Solr start command for instance: [name: default, port: 8983] ... Solr server not yet started for instance: [name: default, port: 8983] [retry: 7, interval: 5000ms] Root cause OOTB (post hybris v5.5) default solr configuration ensures that a standalone Solr server is configured, started and stopped together with the platform. When we use  ctr + c  to stop the Hybris instance it should also stop the solr instance. But sometime solr instance not stopped properly with it and again we try to start the Hybris server, which internally tries to instantiate solr server (which already running) again and that leads to such errors. Troubleshoot steps to solve your issue 1. Stop and start Hybris server aga