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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-07-2008, 07:03 PM
Junior Member
 
Join Date: May 2008
Posts: 2
Question search strangeness

Hi all

im pretty new to Zend_Lucene and cant figure out where I am going wrong.

Th basic problem is that

$index -> find('description:sales'); // will return records
$index -> find('name:sales'); // will return records
$index -> find('hours:full-time'); // will return records

and other text searches work fine, however things like

$index -> find('vacancy_id:9'); // returns nothing
$index -> find('province_id:12'); // returns nothing

I gather that the above queries are supposed to work -- I stored the fields initially as Text and then as Keyword. When I echo the 'id' fields from the HITs they are populated as expected.

So the question is .... does anybody know why my Lucene doesn't return any results for 'id' queries?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-26-2008, 04:09 PM
Junior Member
 
Join Date: May 2008
Posts: 1
Default Numbers are not indexed in standard text fields

I had the same problem. The reason for me was that the standard analyzer doesn't index numbers. So there were two possible solutions in my case:
  1. have a look at Field Types. Keyword is not tokenized but searchable. I use this for my id fields:
    Code:
    $doc->addField(Zend_Search_Lucene_Field::Keyword('id', $id, 'utf-8'));
  2. alternatively, set the default analyzer to a type that does also index numbers. I use this line before indexing and searching:
    Code:
    Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num_CaseInsensitive());

Hope I could help you!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-21-2008, 06:19 PM
Junior Member
 
Join Date: Jun 2008
Posts: 5
Thumbs down Little Old Lady

A young man was walking through a super market to pick upa few things when he noticed an old lady following him."Pardon me," she said. "I'm sorry if my staring at youhas made you feel uncomfortable. ..World Of Warcraft gold is WoW gold, It's just that you lookjust like my son, who died recently.""I'm very sorry," replied the young man, "is thereanything I can do for you?""Yes," she said, "as I'm leaving, would you say'Goodbye, mother?' It would make me feel so much better.""Sure," answered the young man.As the old woman was leaving, he called out,"Goodbye, Mother!" Then, as he stepped up to the checkout counter, he saw that his total was $127.00. "How can that be?" he asked. "I only purchased a few things!"The clerk replied, "Your mother said you'd pay for her."
__________________
World Of Warcraft gold
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 11:56 AM.