This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » Search plugins » No result when searching unique data
No result when searching unique data [message #86704] Wed, 14 October 2009 16:28
jetgars  is currently offline jetgars
Messages: 20
Registered: May 2009
Junior Member
Hi! I'm using propel and symfony 1.2.

I declared my table in my schema.yml and items as follows:

    id:             {type: integer, required: true, primaryKey: true, autoIncrement: true }
    admin_num:      {type: integer, index: unique}
    first_name:     {type: varchar(255)}
    mid_name:       {type: varchar(255)}
    last_name:      {type: varchar(255)}

Since i want my "admin_num" to be unique for each patients i set the index as unique.

Now want to index patient using their first name, last name and admin_num and declare it in this way:

$doc->addField(Zend_Search_Lucene_Field::UnStored('first_name', $this->getFirstName(), 'utf-8'));
       $doc->addField(Zend_Search_Lucene_Field::UnStored('last_name', $this->getLastName(), 'utf-8'));
	   $doc->addField(Zend_Search_Lucene_Field::UnStored('admin_num', $this->geAdminNum(), 'utf-8'));

My search function is working well and return the right results when i use their last name or first name as search parameter, but when i try to search using the admin_num, no results appear? How can i use the admin number searching?

Can anyone help me with this one?
Thank you!
Previous Topic:lucene problems
Next Topic:how to install sfLucenePlugin with Symfony 1.2
Goto Forum:

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software