fix bug returning results after end
add test for term searcher