adding a flexible by_fields search api