cancel
Showing results for 
Search instead for 
Did you mean: 

Error while running delete-Index-cronJob

Former Member
0 Kudos

We're getting an error while launching the delete-marketIndex-cronJob on a freshly created site with the accelerator.

de.hybris.platform.solrfacetsearch.indexer.exceptions.UndefinedIndexerQuery: DELETE query not defined in configuration.

at de.hybris.platform.solrfacetsearch.indexer.strategies.AbstractIndexStrategy.getIndexerQuery(AbstractIndexStrategy.java:184) at de.hybris.platform.solrfacetsearch.indexer.strategies.AbstractIndexStrategy.execute(AbstractIndexStrategy.java:142) at de.hybris.platform.solrfacetsearch.indexer.impl.DefaultIndexerService.deleteFromIndex(DefaultIndexerService.java:92) at de.hybris.platform.solrfacetsearch.indexer.cron.SolrIndexerJob.performIndexingJob(SolrIndexerJob.java:70) at de.hybris.platform.solrfacetsearch.indexer.cron.AbstractIndexerJob.perform(AbstractIndexerJob.java:41) at de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob.performCronJob(ServicelayerJob.java:40) at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1297) at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:815) at de.hybris.platform.cronjob.jalo.Job.access$1(Job.java:772) at de.hybris.platform.cronjob.jalo.Job$JobRunable.run(Job.java:677) at de.hybris.platform.util.threadpool.PoolableThread.run(PoolableThread.java:198) Is there some configuration we're missing? UPDATE: It seems that we have found where to add a new query to solr indexer, it is in the solr.impex file in the initialdata project. ;$solrIndexedType;$searchIndexNamePrefix-deleteQuery;delete;;;false;"SELECT {p:PK} FROM {Product AS p} WHERE {p:varianttype} IS NULL";anonymous
Unfortunately, this gets imported in the HMC as a "full" type query instead of a delete one.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Out of the box with the Accelerator a Delete query is not provided for the SolrIndexedType.

What kind of criteria do you have in mind to delete products as theres a few gotcha's you might need to consider?

Former Member
0 Kudos

We'd like to delete the unapproved products, thanks.

Former Member
0 Kudos

Heres the problem. Running as the anonymous user, you wont be able to see the unapproved products to delete in the first place so you need to be sure you run the delete query as a user with broader visibility.

Former Member
0 Kudos

Hi Richard,

I am facing the same problem with the same requirement. Would just changing the user make it work? Should I need a delete query too? In case we need, Could you please help me with a sample query?

Answers (0)