0

I am using the Zend Search Lucene. However I am having a little trouble. I wish to query the index for the exact string so page_name IS test123, not any fuzzy match.

Currently I have:

$hits = $index->find('page_name:"test123"');

And advice appreciated, thanks!

mrN
  • 3,734
  • 15
  • 58
  • 82
Podlsk
  • 127
  • 2
  • 2
  • 6

1 Answers1

0

Before query, use this analyser instead of the default one:

Zend_Search_Lucene_Analysis_Analyzer::setDefault(
    new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive()
);
Capitaine
  • 1,923
  • 6
  • 27
  • 46