Define mapping for the loan type
Fix loans sorting
Update searchIndexCommand