Re: Searchable behavior on two models

2010-03-11 Thread Delberto
Sorry, here is the link --> http://code.google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=19 On Mar 10, 4:16 pm, Foroct wrote: > Well it looks like this behaviour can't successfully index two > different models. Moving back to an old fashioned 'find'. > > Thanks all. Check out the

Re: Searchable behavior on two models

2010-03-11 Thread Delberto
If you are talking about saving to more than one model with a saveAll there is a patch here. I haven't tried it myself but you can check it out On Mar 10, 4:16 pm, Foroct wrote: > Well it looks like this behaviour can't successfully index two > different models. Moving back to an old fashioned 'f

Re: Searchable behavior on two models

2010-03-10 Thread Jon Bennett
hi, > Well it looks like this behaviour can't successfully index two > different models. Moving back to an old fashioned 'find'. I have the behaviour attached to multiple models, with no issues at all, not with saving or with retrieving. There's something amiss elsewhere. Cheers, J Check out

Re: Searchable behavior on two models

2010-03-10 Thread Foroct
Well it looks like this behaviour can't successfully index two different models. Moving back to an old fashioned 'find'. Thanks all. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscri

Re: Searchable behavior on two models

2010-03-08 Thread Foroct
I've looked at the array I am passing when the post gets entered and its fine. I am saving correctly using $this->Post and the post data saves to the post table fine. My models look like this. User var $actsAs = array('Searchable' => array( 'fields' => array('username', 'first_nam

Re: Searchable behavior on two models

2010-03-08 Thread cricket
Did you try logging $data? Or check that you're not doing $this->User- >save(...) instead of $this->Post->save(...) This is how I have my models set up. You should ignore the 'fields' array in the behavior settings. I made a bunch of modifications to it. User: public $hasMany = array( 'P

Re: Searchable behavior on two models

2010-03-08 Thread Foroct
I thought so after I wrote it out, but when I removed the hasOne association I still get the same result. For some reason when I create a post, the post gets added with no problem but the seachable fails and kicks an error. Query: INSERT INTO `search_index` (`model`, `association_key`, `data`, `m

Re: Searchable behavior on two models

2010-03-08 Thread Jon Bennett
> User - hasMany Post and hasMany Comment > > Post - belongsTo User and hasMany Comment > > Comment - belongsTo User and belongsTo Post and hasOne User Last one looks wrong to me, I'd expect: Comment belongsTo Post, User Post belongsTo User Post hasMany Comment User hasMany Comment, Post cheers,

Re: Searchable behavior on two models

2010-03-08 Thread Foroct
All three models have the same $actAs array var $actsAs = array('Searchable'); Each model saves its data properly using if ($this->Model->save($this- >data)) { Where it falls apart is after the model data save and prior to the search_index save. I have tracked the issue down to something in my m

Re: Searchable behavior on two models

2010-03-07 Thread cricket
What do the models look like? Especially the $actsAs arrays. What does the data look like before you save it? Are you using saveAll()? Try adding some debugging calls in the behavior's beforeSave() & afterSave() methods. On Mar 6, 4:05 pm, Foroct wrote: > Continuing to work on this I have found

Re: Searchable behavior on two models

2010-03-06 Thread Foroct
Continuing to work on this I have found that when I comment out my var $hasMany = array( in my User model, then this searchable plugin works fine. I tried to comment out the individual keys for this array but that did not help. When I remove the hasMany array then I am able to successfully add c

Re: Searchable behavior on two models

2010-03-03 Thread Foroct
I am continuing to work on this as I want more than one model on my site searchable. It looks like the problem is occurring in the Searchable Behavior setup function. function setup(&$model, $settings = array()) { $settings = array_merge($this->_defaults, $s

Searchable behavior on two models

2010-03-01 Thread Foroct
I am using this behavior (http://code.google.com/p/searchable- behaviour-for-cakephp/) on two different models (User and Post). Searchable is working fine when I add a new user and search for a user. I manually populated a few rows of Post data and my search for a post function works fine. However

Issues with Searchable Behavior and PHP 4.x.x

2010-02-03 Thread Mayank Singhal
Hi, I am trying to use Searchable Behaviour hosted here: http://code.google.com/p/searchable-behaviour-for-cakephp/ To initialize the search_index table with existing data, I have used this: http://code.google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=1&q=controllerReply No. 2 which c

Re: Searchable Behavior w/ Strings less then 3 characters

2009-05-23 Thread brian
You're using MySQL? Have a look here: http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html On Sat, May 23, 2009 at 2:33 PM, Kyle Decot wrote: > > I am using the Searchable Behavior on my website but I've noticed that > if someone types something that is 3 ch

Searchable Behavior w/ Strings less then 3 characters

2009-05-23 Thread Kyle Decot
I am using the Searchable Behavior on my website but I've noticed that if someone types something that is 3 characters or shorter, then nothing is returned. I understand that this is because FullText search is set up this way. Is there any way to change this? I get an awful lot of people

Re: SQL errors with the searchable behavior

2008-10-13 Thread acoustic_overdrive
are of the SQL error. I am still > >> not > >> getting any results, clearly because my search_index table is empty. > > >> I assume that Model::save will take care of the index on inserts and > >> updates, is that correct? But how do I retroactively index

Re: SQL errors with the searchable behavior

2008-10-13 Thread RyOnLife
alized $actsAs needs to go in >> the >> >> model, not the controller. That took care of the SQL error. I am still >> >> not >> >> getting any results, clearly because my search_index table is empty. >> >> >> I assume that Model::save

Re: SQL errors with the searchable behavior

2008-10-13 Thread RyOnLife
and >> updates, is that correct? But how do I retroactively index the data that >> already exists in my tables? >> >> >> >> RyOnLife wrote: >> >> > I am trying a simple search with the searchable behavior from >> >http://code.google.com/p/sea

Re: SQL errors with the searchable behavior

2008-10-13 Thread acoustic_overdrive
e care of the index on inserts and > updates, is that correct? But how do I retroactively index the data that > already exists in my tables? > > > > RyOnLife wrote: > > > I am trying a simple search with the searchable behavior from > >http://code.google.com/p/searc

Re: SQL errors with the searchable behavior

2008-10-13 Thread RyOnLife
, is that correct? But how do I retroactively index the data that already exists in my tables? RyOnLife wrote: > > > I am trying a simple search with the searchable behavior from > http://code.google.com/p/searchable-behaviour-for-cakephp/. > > I've create

SQL errors with the searchable behavior

2008-10-13 Thread Ryan
I am trying a simple search with the searchable behavior from http://code.google.com/p/searchable-behaviour-for-cakephp/. I've created the table and put the search_index.php file in the models folder and the searchable.php behavior in the behaviors folder. I've got $actsAs in my

searchable behavior

2008-09-25 Thread Matsinet
Has anyone got the searchable behavior working correctly with rebuildOnUpdate set to true? I am experiencing updates are creating new records in the search_index table instead of updating the existing index row. I am looking for a way to troubleshoot the behavior but every time I put a debug