开发者

Using Lucene just as an inverted index

Lucene has a great capability of incremental indexing. Which is normally a pain when developing a IR system from scratch. I would like to know if I can use low-level Lucene APIs to use it only as an Inverted Index, i.e., storage for inverted lists, position information, term frequency, idfs, field storage, etc...

Bottom line is that I want to implement my own weightings and scoring of documents. I'm aware of Similarity class, but It does not give th开发者_如何学Ce flexibility I want.


You can certainly make your own query class, and your own scorers etc. The only problem you might run into is if you need global data. (E.g. in tf/idf you need to know, well, the term freq and inverse doc freq.) If there is some other cross-document or cross-term metadata you need for your scoring algorithm, you might run into trouble because there isn't a great way that I know of for storing this.

But basically, as long as your algorithm is vaguely tf/idf or works per document only, I think you should be fine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜