create special class to handle search in rex. add metadata handler.