@John:

I "think" I'm able to wrap my head around the concept. My project is
extremely search heavy and if I'm following you correctly I can see a few
distinct advantages to your system. What I like the most is being able to
keep a history of searches within the session. I see a catastrophe just
waiting to happen 8-) but I'd like to have a go at it on a smaller scale
with one of my simpler searches and expand from there if all goes well. I
don't want to bite off more than I can chew so for now I'll tackle one
experiment at a time and thanks to Calvin this bitwise thing is working out
rather well and I'm close to wrapping it up. If it's okay with you I might
have a few other questions to throw at ya' when I'm ready to start (I'll
start a new post when the time comes).

- Ed

On Thu, Jun 10, 2010 at 3:34 AM, John Andersen <[email protected]>wrote:

> I am using the DB to store the search criteria and the result. Not
> that the result creates more information, it creates only
> relationships between the stored search criteria and the existing
> records in other tables.
>
> The search is currently only based on one subject, either Article,
> Blog, Ebook, or Author, but can easily be expanded to search through
> all of the subjects.
>
> The Enquiry model stores the search criteria, thus getting an ID. The
> model has a HABTM relationship with the above subject models. The
> Enquiry model passes on the search criteria with the ID to the
> relevant subject model, which then executes the search within its
> records. The subject model passes on the resulting subject ids to the
> HABTM model, which stores the result.
>
> The Enquiry model ID is then passed back to the controller, which uses
> paginate to show the result.
>
> A short version of the ER diagram can be seen here:
> http://jaa.myftp.org:28880/examples/enquiry
>
> The way I have implemented this, also allows me to keep a history of
> search within the session. The history is also presented to the user,
> thus allowing the user to go back to previous results.
>
> Hope the above explanation is usefull to you :)
> Enjoy,
>   John
>
>
> On Jun 10, 10:04 am, Ed Propsner <[email protected]> wrote:
> [snip part for Calvin]
> > @John:
> >
> > Are you using the db to cache your search results on the server side? I
> > learned some hard lessons in the past and need to cut down the load
> wherever
> > I can. Is there any specific advantages to setting up your search the way
> > you have it?
> >
> > - Ed
>
> 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 subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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 subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to