On 15/05/2017 12:51, Knut Arne Bjørndal wrote:
In addition to some of those mentioned (Analyzer, QueryParser, Query,
Compiler, Matcher)

Which QueryParser methods do you override?

we are subclassing Analyzer::Normalizer and
PolyQuery/PolyMatcher.

How and why do you subclass Normalizer? Would it be possible for you to write a separate Analyzer instead that creates its own Normalizer (composition vs. inheritance)?

The PolyQuery/PolyMatcher implementation is to get custom scoring (we
need max(), not sum()), and iirc subclassing ORQuery/ORMatcher turned
out to be problematic, so I ended up basing in on Poly* instead.

Do you reimplement ORQuery and all related classes in Perl just to get a custom Score method for ORScorer? Or you do somehow delegate to the ORQuery classes? To make custom scoring easier, we'd probably need something like a Scorer class that could be attached to a Query.

Nick

Reply via email to