3

I wonder if it is possible to configure mlt (more like this) to do the similarity on close numbers ?

For example, a document with the field numberOfParticipant at 10, i would like to have some similar documents with numberOfParticipant between 5 and 15.

Does this option exist ?

Valentin
  • 101
  • 7

1 Answers1

2

FunctionQuery may be your solution http://wiki.apache.org/solr/FunctionQuery . I never used it myself, but this must be reasonably easy to code something like this:

10-|10-X| where |x| is the absolute value of x 

Sample values of X and output:
X  => Result
8     8
9     9
10    10
11    9
12    8

Then specify a boost for that function. In solr, you may need to code it like sub(10,abs(sub(10,X))).


But then if you actually wanted to categorize results as "less than 5", "5-15", "greater than 15", choose faceting http://wiki.apache.org/solr/SolrFacetingOverview

Jesvin Jose
  • 22,498
  • 32
  • 109
  • 202
  • In fact, this is similar to a question i asked, or maybe exact the same question about MLT. @Valentin have you found a solution? – trillions Jul 04 '12 at 09:54