Add getDistinct and allRows to search