Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-17-2008, 12:19 PM
Junior Member
 
Join Date: Jul 2008
Location: london
Posts: 19
Default Zend_search_lucene multi terms

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'));
...
and my websites search looks like :
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);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-18-2008, 02:48 PM
Junior Member
 
Join Date: Jul 2008
Location: london
Posts: 19
Angry poke

Does anyone know a good tut for multi-term-lucene searching?

It's fine 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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:08 AM.