我有非常简单的 Zend Lucene 公司索引,使用它来创建索引:
// store company primary key to identify it in the search results
$doc->addField(Zend_Search_Lucene_Field::Keyword('pk', $this->getId()));
// index company fields
$doc->addField(Zend_Search_Lucene_Field::Unstored('zipcode', $this->getZipcode(), 'utf-8'));
$doc->addField(Zend_Search_Lucene_Field::Unstored('name', $this->getName(), 'utf-8'));
我可以搜索公司名称,但不能搜索邮政编码。Zend Lucene Search 索引整数有问题吗?如果 s/o 可以阐明谁有经验,请帮助我。我只能想象使用 Lucene 按邮政编码搜索是很常见的。