Hi Bakers,

Some of you may recall an email I sent to the list a month or so ago on how
to integrate a search engine into a CakePHP app. Someone suggested I use the
Lucene stuff from the Zend framework and that seemed like a good solution.
It used a shell script (written by an author whose name I can't recall,
sorry!) to wget recursively the site in order to index the content.
I'm only getting around to actually doing the search engine now and before
starting I realized the entire site is non-public, meaning all pages are
behind a login/auth (cookie/session based) page which makes it hard for wget
to get in. I've tried googling around to find out how other people do it but
wasn't very successful. Can this be overcome? (non-hackishly, if possible)

Another idea I had, given this hurdle, is to create a search() function in
every model that should be searchable. When a search is made, I would look
for a "search" function in all available models and where it is defined,
call it with the search string as the argument. The search function in each
model would then do the necessary database querying of the fields that
should be searchable and return the matches.

Does this seem like a crazy idea? I don't have THAT many models,
fortunately, and I guess the search functionality would be pretty identical
in all the models, except for the names of the searchable fields, so I would
have a generic search function that I would adapt to each model. Haven't
tested this at all so I'm just throwing the concept up in the air and hoping
to get some feedback, specially from those who have had experience doing a
similar thing.

Thanks in advance!

Regards,
Gonzalo.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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