开发者

Lucene keyword notification

开发者 https://www.devze.com 2023-01-10 17:33 出处:网络
What\'s the best way to get a notification (say an event) when a keyword is found in a document in Lucene?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消