3
votes

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 the flexibility I want.

1

1 Answers

1
votes

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.