@ Override public float getProgress ( ) { if ( numIndexes < 1 ) { return 1.0f ; } float indexProgress = ( float ) currentIndexPathIter . previousIndex ( ) / ( float ) numIndexes ; float queriesProgress = 1.0f ; if ( queries . size ( ) > 0 ) { queriesProgress = ( float ) currentQueryIter . previousIndex ( ) / ( float ) queries . size ( ) ; } queriesProgress *= 1.0f / numIndexes ; return indexProgress + queriesProgress ; }
This is sort of an approximation of progress . It splits the progress equally among all indexes then among all queries for that index . So it won t move linearly since we don t know how many hits there will be per query