Lucene keyword notification
What's the best way to get a notification (say an event) when a keyword is found in a document in Lucene?
The brute force way is to keep searching for the keyword in short intervals but that seems very ineffic开发者_开发技巧ient as well as not as "real-time"
Take a look at MemoryIndex:
http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/index/memory/MemoryIndex.html
It's part of Lucene contrib, and it is designed for publish/subscribe systems that you're building. However, it's been a while since I've looked at this, and I'm not sure if it's being actively maintained.
精彩评论