Using Zend Lucene I cannot search numbers in description fields
Added it like this:
$doc->addField(Zend_Search_Lucene_Field::Text('description', $current_item['item_short_description'], 'utf-8'));
Googling for this showed that applying following code should solve the problem, but it did not..:
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());
any thougts?
You have to set the default analyzer twice: On the indexing process as well as on the searching process.
Use the code line from above:
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());
Did you use that command before or after calling Zend_Search_Lucene::open()?
Calling it beforehand definitely works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With