synack
synack

Reputation: 1749

OR terms query with boosting

Using Lucene, I want to compare a document in the index with the rest of documents. I found out that an easy way would be to submit the document as a query. The problem is that I need to put terms as an OR-Ring and, the most difficult part, boost the terms with the term frequency.

I think that if I trim all blank spaces of the document and replace them with ' OR ', lucene will parse it and interpret it. But is there a most sophisticated way to deal with this problem?

And which is the easiest way to boost the terms with their respective frequencies?

Upvotes: 1

Views: 49

Answers (1)

jpountz
jpountz

Reputation: 9964

It looks like you are trying to re-implement Lucene's MoreLikeThis.

Upvotes: 1

Related Questions