I have a legacy system based on Solr 1.2 and trying to port it to
ES. One of the features of the system is the possibility to create a
"context" inside your index, a "context" is a search in the index with
a big list of terms of some concept like Middle East Economy, Weather
in Brazil, etc... As the list of terms in the search grows, the number
of docs returned by that search also grows, but docs with a low score
are outside the context (meaning that the document is not of that
subject), so I Iet the user choose a threshold score that will define
the docs inside the context.
In that version of Solr, (Lucene was 2.2) there was no way to
filter the documents of a search by a score, and I needed to know how
many documents had a score higher than the threshold, so I created a
SearchHandler that used a ScoreCollector wich extended HitCollector
and just computed how many documents passed the threshold (a parameter
passed to the handler) and returned that.
Do you guys have any clue how to achieve this with ES? I would
have to write a plugin or something? Is there a way of filtering
results by a minimum score in ES? That would be great! I tried using
the _score in a filter script but I see that the scorer inside
DocLookup is null. Is there some kind of after-score filter, filters
that are applied after the score is computed?
Thanks for the help,