当我存储数据到Lucene时,我会添加这些字段:
$index->addField(Zend_Search_Lucene_Field::Keyword('id', $entry->id));
$index->addField(Zend_Search_Lucene_Field::Keyword('type', $entry->type));
如何查询只有特定类型的数据?
我尝试过:
$query = "type IN ('a', 'b', 'c')"; // get data that has either of these types
$this->query->addSubquery(Zend_Search_Lucene_Search_QueryParser::parse($query), true);
但它不起作用...
type:(a) OR type:(b)
等等。 - Alex