Updates to the search

Updated the search to prevent the termarray items from changing slots
when terms where deleted