Writing new JS file for text search