With Solr 8âs support ending in June 2024, itâs crucial for local environments to transition to Solr 9. Unlike cloud installations of SAP Commerce (where you can easily switch Solr versions via manifest.json), local setups encounter difficulties in switching between Solr versions.
There are cases, when it is required to use same solr index to index/search different itemtypes. For example, it is required to have in search box autocompletion different types, like Product and Media. Another common use case would be display on search result page search results of different itemtypes mixed together (for example, Product, Media, custom Resource itemtype).
Solr hot update indexing always uses current session user, for example current backoffice user, who triggered solr hot reindex. In lots of real world cases it would lead to wrong results in solr due to different flexible search restrictions, which are applied to backoffice user and solr indexing user.
OOTB hybris has a powerful âFlexible Search Restrictionâ system, which allows transparently restrict access to any hybris item type. Due to flexible search restrictions are implemented on a very low level of hybris ORM time to time unexpected issues can appear even for simple restrictions.
Starting catalog synchronization with CatalogVersionSyncJob in a bussiness process action leads to âError in worker SyncWorker : Entity not found ( pk = 8794627343487 name = âde.hybris.platform.persistence.processing_CronJobâ type code = â501â db table = âcronjobsâ)â. I didnât find a way to fix such behaviour of syncing inside business process action, but I resolved this issue by triggering event from process action and running SyncJob in event listener. For me sync performs well only via SetupSyncJobService, performing job via CatalogSynchronizationService causes exception in SyncWorker.
From time to time I have been receiving from customer support service messages that filter functionality on PLP returns no results. Finally, after 1 year of such messages our QA team was able to reproduce the issue. The root of the issue is too many filters, which causes creation of very long requests, which canât be processed by solr server. Solr server is shipped with Jetty, which has 8KB limit to URL length. You can change this limit by adding <Set name="requestHeaderSize"> 200000 </Set> to server/contexts/solr-jetty-context.xml.
After discussions with DevOps Lead and Tech Lead we decided that in our case will be better to force hybris solr client to use POST requests instead of GET and donât change solr server OOTB settings (by default Jetty has limitation to 200KB for POST body). Unfortunately hybris doesnât provide any configuration for such switching, and it must be done manually by overriding DefaultFacetSearchStrategy.
Adding Category itemtype for indexing doesnât require any specific actions, except adding corresponding changes to solr.impex files. But in case of two different itemtypes in one SolrFacetSearchConfig it is not enough just to change impexes you also need to adopt java source code.