search functionality working for premitive and non premitive datatype