This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

No result when searching unique data

Questions relating to sfLucenePlugin, sfSearch etc

No result when searching unique data

by jetgars » Wed Oct 14, 2009 4:28 pm

Hi! I'm using propel and symfony 1.2.

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

Code: Select all
Patient:
    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:

Code: Select all
$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!
jetgars
Junior Member
 
Posts: 20
Joined: Sun May 03, 2009 7:39 pm

Re: No result when searching unique data

by Sxandy » Fri Nov 14, 2014 2:09 pm

What happens when you attempt to pursue in the front-end? Simply no effects or do you get a mistake message?
Scarlett
Sxandy
Junior Member
 
Posts: 1
Joined: Fri Nov 14, 2014 1:59 pm