Hello, When I use QueryParser with phrase queries it makes some errors. It assumes that positionIncrement must be 0 or 1. In my case it can be greater than one (in case of stop words). It handles all non ONE positionIcrement as zero. The error is at lines 384, 385 if (t.getPositionIncrement() == 1) positionCount++; Must be if (t.getPositionIncrement() != 0) positionCount+=t.getPositionIcrement();
It assumes that the phrase "the quick brown" has only one positionCount. "quick" returns positionIncrement=2 (handled as Zero), and "brown" returns positionIncrement=1. It generates a BooleanQuery instead of MultiPhraseQuery and it matches documents like "quick". -- regards, Ahmed Saad --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]