LPS-51735 Proper use of search container to make sure that the total and start/end are correctly calculated

cc/ @adolfopa