[3.0] Support a Textual Search in PostgreSQL

21 views
Skip to first unread message

Cauan Cabral

unread,
Feb 22, 2015, 11:06:06 AM2/22/15
to cakeph...@googlegroups.com
Hi,

I've working in adding support for full text search in top of PostgreSQL but I'm stuck (would like to share it as a plugin, maybe extending it to others DB - as Mysql which support textual search):

First, I created a "Tsvector" type for search columns[1]. Although I can save values in the database, they are saved as basic tsvector (as a "values"::tsvector cast).

The correct approach would define column value with a function call: to_tsvector('values')
But if I rewrite $value to that in Tsvector::toStatement, it did escaped and saved in DB as "to_tsvector('".

Theres currently a way to define a field value as result of a SQL call function?

Maybe allowing using a Query->func()->to_tsquery('values') ? 


[]'s
--
Cauan Cabral
----------------
Como falar comigo: Google Talk: cau...@gmail.com Skype: CauanCabral MSN: cau...@gmail.com
Onde me encontrar: LinkedinFacebookWordpressTwitter

Stephen Cuppett

unread,
Feb 22, 2015, 7:54:58 PM2/22/15
to cakeph...@googlegroups.com
I have a plugin like this (for Cake 2.6). I wouldn't mind getting feedback/patches to support 3.0.



Thanks,


--

Stephen Cuppett




--
You received this message because you are subscribed to the Google Groups "cakephp-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cakephp-core...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cauan Cabral

unread,
Feb 23, 2015, 9:58:03 AM2/23/15
to cakeph...@googlegroups.com
Hi Stephen,

I really like how you take that in Cake 2.6.
Maybe with the flexibility provided by ORM in 3.0 we could make it work more "native" (with defaults finders).

I'll play more with the plugin ;]
Reply all
Reply to author
Forward
0 new messages