script to prepare search engine