Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.1
-
None
-
Operating System: GNU/Linux Debian
PHP Version: 5.2.0
Database and version: PostgreSQL 8.3
Description
While trying to reindex your data, the script bin/php/updatesearchindex.php won't work properly with a PostreSQL database.
It starts but can't retrieve the object count, dut to a problem with an object counting SQL request. .Then it tries to go through, but loops on failure.
The request generated by API on line 140
$rows = eZPersistentObject::fetchObjectList( $def, $fieldFilters, $conds, null, $limit, $asObject, false, $customFields );
seems to be the problem as it returns null.
In fact, you'll get the following SQL error in your error log file:
[ Nov 17 2008 17:22:13 ] [] eZPostgreSQLDB: Error: error executing query: SELECT COUNT(id) AS object_count FROM ezcontentobject WHERE status='1' ORDER BY id ASC ERROR: column "ezcontentobject.id" must appear in the GROUP BY clause or be used in an aggregate function
Then the generated request doesn't seem to be well supported.
Steps to reproduce
With an eZ Publish running a PostgreSQL database:
- browse to your eZ directory and then launch the update search script
$php bin/php/updatesearchindex.php
This will end up on a loop like:
Starting object re-indexing Number of objects to index: . 0.00% . 0.00% . 0.00% .................
Nothing more will happen, you won't be able to reindex this way