I had the same problem. The reason for me was that the standard analyzer doesn't index numbers. So there were two possible solutions in my case:
- have a look at Field Types. Keyword is not tokenized but searchable. I use this for my id fields:
Code:
$doc->addField(Zend_Search_Lucene_Field::Keyword('id', $id, 'utf-8'));
- alternatively, set the default analyzer to a type that does also index numbers. I use this line before indexing and searching:
Code:
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num_CaseInsensitive());
Hope I could help you!