implementing basic search in index