21473 Posts in 5780 Topics by 2620 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 772 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?
| 772 Views | ||
|
Page:
1
|
Go to Top |

