Posted by mscalone on October 23, 2009 at 3:00pm
Jump to:
| 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
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
Automatically closed -- issue fixed for 2 weeks with no activity.