|
|||
|
I'm having some issues with the multi term search with zend lucene, it seems to ignore the second term... i have a result set with 3 contacts with the surname "edward" who are all english.
But when I add a second term with language = french, the 3 still come up. Both terms are set to "required", so I was expecting 0 result. Also I can't use a wildcard with multi terms, is this right? I want to get "edwards" as well as "edward" with "edward*" The index is being populated like so: Code:
...
$this->addField(Zend_Search_Lucene_Field::Text('name', $name, 'iso-8859-1'));
$this->addField(Zend_Search_Lucene_Field::Text('language', $language, 'iso-8859-1'));
...
Code:
$query = new Zend_Search_Lucene_Search_Query_MultiTerm();
$query->addTerm(new Zend_Search_Lucene_Index_Term('edward','name',true)) ;
$query->addTerm(new Zend_Search_Lucene_Index_Term('EN',language,true));
$result = $index->find($query);
|
|
|||
|
Does anyone know a good tut for multi-term-lucene searching?
It's fin e if I just have one search field, but if I want to convert a whole search form to use lucene it seems to ignore all fields except the first one. Not sure what I'm doing wrong, but the Zend_Lucene API doesn't seem to work with multi terms. For me anyway! Just wondering if any of you have had similar experiences with this? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|