/** * Configure the class to use only weakFingerprint algorithm * * @param bool $flag boolean flag * * @return void */ public static function setUseWeakFingerPrintOnly($flag = true) { self::$useStrongFingerprint = !$flag; }
public function testQuerySimilarity() { $q1 = Zend_Search_Lucene_Search_QueryParser::parse('foo bar baz'); $q2 = Zend_Search_Lucene_Search_QueryParser::parse('bar baz foo'); $realIndex = $this->getRealIndex(); $a1 = new Zle_Paginator_Adapter_Lucene($realIndex, $q1); $a2 = new Zle_Paginator_Adapter_Lucene($realIndex, $q2); $this->assertEquals($a1->queryFingerPrint(), $a2->queryFingerPrint(), "Query fingerprints should be the same with inverted words"); }