sheevazz / searchable-behaviour-for-cakephp

Automatically exported from code.google.com/p/searchable-behaviour-for-cakephp
0 stars 0 forks source link

Queries returned: "searchModels" or "search" #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. When I inserted a key word into the following form:
        echo $form->create("Search", array('action' => 'search'));
    echo $form->input("q", array('label' => 'Search for '));
    echo $form->end("Search");

2. I was either returned the following queries
   a. searchModels
   b. SELECT COUNT(*) AS `count` FROM `search_indices` AS `SearchIndex` 
WHERE MATCH(`SearchIndex`.`data`) AGAINST('hii' IN BOOLEAN MODE) 
   c. SELECT `SearchIndex`.`id`, `SearchIndex`.`association_key`, 
`SearchIndex`.`model`, `SearchIndex`.`data`, `SearchIndex`.`created`, 
`SearchIndex`.`modified` FROM `search_indices` AS `SearchIndex` WHERE 
MATCH(`SearchIndex`.`data`) AGAINST('hii' IN BOOLEAN MODE) LIMIT 10
3. Or...
   a. search
   b. SELECT COUNT(*) AS `count` FROM `search_indices` AS `SearchIndex` 
WHERE MATCH(`SearchIndex`.`data`) AGAINST('hii' IN BOOLEAN MODE) 
   c. SELECT `SearchIndex`.`id`, `SearchIndex`.`association_key`, 
`SearchIndex`.`model`, `SearchIndex`.`data`, `SearchIndex`.`created`, 
`SearchIndex`.`modified` FROM `search_indices` AS `SearchIndex` WHERE 
MATCH(`SearchIndex`.`data`) AGAINST('hii' IN BOOLEAN MODE) LIMIT 10 

The difference between (2) and (3) lies only in (2a) and (3a).

The array returned (in '$results') was empty. 

I'm using PHP 5.3 and CakePhp 1.2 on Windows Vista. 

I indexed the database by the code listed in "Comment 2 by Romko.Stets, Oct 
13, 2008" of Issue 1.

Thanks in advance for any reply to my difficulties.

Regards,
Ming

Original issue reported on code.google.com by tsuiwaim...@gmail.com on 17 Aug 2009 at 9:05