18590 Posts in 4875 Topics by 2285 members
General Questions
SilverStripe Forums » General Questions » SS 2.4 rc1 PostgreSQL and searchEngine
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 580 Views |
-
SS 2.4 rc1 PostgreSQL and searchEngine

7 April 2010 at 4:37am Last edited: 7 April 2010 8:25pm
Hi all:
I need to put search engine working in my SS 2.4 with PostgreSQL.
In the file PostgreSQLDatabase.php, function searchEngine , the query$result=DB::query("SELECT table_name, column_name, data_type FROM information_schema.columns WHERE data_type='tsvector' AND table_name in ('" . implode("', '", $classesToSearch) . "');");
needs to be changed to:$result=DB::query("SELECT \"table_name\", \"column_name\", \"data_type\" FROM \"information_schema\".\"columns\" WHERE \"data_type\"='tsvector' AND \"table_name\" in ('" . implode("', '", $classesToSearch) . "');");
to work correctly.
Now, the SQL gives no error, but is empty, so the lineif (!$result->numRecords()) throw Exception('there are no full text columns to search');
is executed.I have execute the query to see all date_type values and does not exist in any table with "tsvector" date_type.
I change the query to:$result=DB::query("SELECT \"table_name\", \"column_name\", \"data_type\" FROM \"information_schema\".\"columns\" WHERE \"data_type\"='text' AND \"table_name\" in ('" . implode("', '", $classesToSearch) . "');");
but now I´m having new error function ts_rank(text, tsquery) does not exist".
What I´m doing bad? Is the searcEngine tested with PostgreSQL?
| 580 Views | ||
|
Page:
1
|
Go to Top |

