【发布时间】:2011-11-05 11:27:45
【问题描述】:
我正在使用 Zend Lucene,想知道是否可以将范围查询与多项查询结合起来执行单个搜索操作。
例如,您构造一个范围查询,如下所示:
$from = new Zend_Search_Lucene_Index_Term('20020101', 'mod_date');
$range = new Zend_Search_Lucene_Search_Query_Range(
$from, null, true // inclusive
);
然后像这样构造一个多词查询:
//this example uses only 1 term but the real use case has many terms forming the multiterm
$multi_term = Zend_Search_Lucene_Search_Query_MultiTerm(new Zend_Search_Lucene_Index_Term('foo','title'));
然后不知何故,
$combined = combine($range,$multi_term);
$hits = $index->find($combined);
使用 Zend Lucene 可以实现类似的功能吗?
【问题讨论】:
标签: php zend-framework lucene