refactor search engine to use ner instance