private void performIndexActions ( Progress progress , String transactionId ) { List < IndexAction > indexActions = dataService . findAll ( INDEX_ACTION , createQueryGetAllIndexActions ( transactionId ) , IndexAction . class ) . collect ( toList ( ) ) ; try { boolean success = true ; int count = 0 ; for ( IndexAction indexAction : indexActions ) { success &= performAction ( progress , count ++ , indexAction ) ; } if ( success ) { progress . progress ( count , "Executed all index actions, cleaning up the actions..." ) ; dataService . delete ( INDEX_ACTION , indexActions . stream ( ) ) ; dataService . deleteById ( INDEX_ACTION_GROUP , transactionId ) ; progress . progress ( count , "Cleaned up the actions." ) ; } } catch ( Exception ex ) { LOG . error ( "Error performing index actions" , ex ) ; throw ex ; } finally { progress . status ( "Refresh index start" ) ; indexService . refreshIndex ( ) ; progress . status ( "Refresh index done" ) ; } }
Performs the IndexActions .