Problem using same instance of indexSearcher for multiple requests

后端 未结 7 975
半阙折子戏
半阙折子戏 2020-11-30 14:47

Am using Lucene API in a .net web application. I want to use the same instance of Indexsearcher for all the requests.Hence am storing indexsearcher instance in http cache.<

7条回答
  •  抹茶落季
    2020-11-30 15:06

    Steve, see best ways of using IndexSearcher. This is a bit dated, but the principle remains: Use a single instance of IndexSearcher, guard it using the proper thread safe code (which I do not know how to do in .Net), and invalidate it once the index is updated. I believe this is what Jesse has suggested, and I second this idea.

提交回复
热议问题