|Search filter [message #79879]
||Mon, 15 June 2009 15:38
Registered: May 2009
I have a page called listResultsSuccess.php which displays a list of data that is pulled from a db.
Some of them have a field called 'type' and what I'm looking to do, is to keep the existing default list of all of the data but then create a search filter.
So from a select list, have the types in a list and if 'type1' is picked, the page will then display all of the items in the db that has a type of type1.
Is this possible?
[Updated on: Mon, 15 June 2009 16:10]
|Re: Search filter [message #88796 is a reply to message #80223 ]
||Sat, 21 November 2009 17:08
Registered: July 2009
I am implementing search according to the steps described in Jobeet - search 17th chapter.
Now for example if I write a word in the textbox, then it looks for this word, and retrieves all the data that contains this word, but what I want is to retrieve only the exact word.
I have two fields in the table: 1) word 2) description
now if I write 'computer' in the textbox, it should look for the exact word 'computer' in the word field and retrieve its description.
Can you please help me with this??
I also modified this method:
static public function getForLuceneQuery($query)
$hits = self::getLuceneIndex()->find($query);
$pks = array();
foreach ($hits as $hit)
$pks = $hit->pk;
$criteria = new Criteria();
$criteria->add(self::ID, $pks, Criteria::IN);
and deleted the Criteria::IN so that it would take its default criteria EQUAL, but then it brings no result at all.