Project:Reindex
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

There is a query doesn't work on postgres:

db_query("INSERT INTO {search_total} (word, count) SELECT word, LOG10(1+1/GREATEST(1, SUM(score))) FROM {search_index} GROUP BY word");

the log function is specific for mysql.. you sould use this on postgress

db_query("INSERT INTO {search_total} (word, count) SELECT word, LOG(10, CAST(1+1/GREATEST(1, SUM(score)) as numeric)) FROM {search_index} GROUP BY word");

Comments

#1

Status:active» fixed

Fixed in 7.x-1.x. Also see #257916: more optimal search totals calculation for some more problems with LOG10 and GREATEST.

Edit: And comitted to 6.x-1.x.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here