Team

Looks like there are two problems in SloppyPhraseScorer.cpp:

1) checkedRepeats doesn't get initialized in the constructor and has
varying values upon entry into initPhrasePositions() -- noticed in the
Debug vs Release mode.

This is inherited from the Java code, which doesn't have this
initialization either.

Easily fixed by adding checkedRepeats = false; to the SloppyPhraseScorer
constructor.

2) std::qsort(repeats, repeatsLen, sizeof(PhrasePositions*),
comparePhrasePositions);

For some reason, comparePhrasePosition is receiving (x,y) with unexpected
(apparently random) values in the offset field.

Unable to suggest a fix -- as a stopgap, just replaced std::qsort with
std::sort -- as follows:
std::sort(repeats, repeats + (repeatsLen-1), comparePhrasePositions);

No idea if / how these changes will affect tests.

Regards
Celto
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to