cancel
Showing results for 
Search instead for 
Did you mean: 

index get removed after running full index operation

Former Member
0 Kudos

Hello, I am currently working on migrating 4.8 to 5.5. In 5.5, when we do solr indexing, if we run Full Indexer Operation then indexes get deleted at the end of process. I can see in the logs that indexing is correctly happening but in the end when I check solr console, document count seems to be 0. Instead of Full, if I run Update Indexer configuration then it seems to work fine & index get persisted in solr. When I digged into code, I found that below lines from FullDirectIndexOperationStrategy are the culprit:-

public void afterIndex(final IndexerContext context) throws IndexerException

 {  

     final String removeQuery = "-indexOperationId_long:[" + context.getIndexOperationId() + " TO *]";  

     this.indexer.removeItemsByQuery(context.getFacetSearchConfig(), context.getIndexedType(), context.getIndex(), removeQuery);  


i extended FullDirectIndexOperationStrategy & overrode afterIndex method by commenting above 2 lines, then Full operation works fine. So can any one help me to understand significance of above 2 lines in FullDirectIndexOperationStrategy?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

was your issue fixed? i am migrating from 5.1 to 5.7 and facing the same issue. Was there any customization required to get past this error?

former_member775304
Participant
0 Kudos

Hello,

Since version 5.5, the FULL operation using DIRECT mode behaves in a different way: https://wiki.hybris.com/display/release5/Indexing+Process#IndexingProcess-IndexingModefortheFULLOper...

In your case it seems that the indexOperationId field is not added to the documents being indexed.

Have you customized the indexing process (custom implementation of some of the services/spring beans)? This would explain your issue.

Regards, José