When the code runs below, I assume that the stop word file is read from the file system every time the request is parsed. Instead, can I reuse the same analyzer instance instead of creating a new one? Is it thread safe? (After long searches I can not find information about this)
var stopwordsFile = new FileInfo("C:\MyStopWordsFile.txt");
var analyzer = new StandardAnalyzer(stopwordsFile);
var queryParser = new QueryParser("", analyzer);
var query = queryParser.Parse(stringToParse);
source
share