Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all,
Not work search after I updated drupal from 6-17 to 6-19.
I use PostgreSQL 8.4.4
I found error in syslog
ERROR: operator does not exist: integer || integer
and postgresql.log
Aug 13 14:36:55 mysuperserver postgres[24797]: [2-3] STATEMENT: SELECT COUNT(*) FROM (SELECT i.type, i.sid, 5 * (17.007091957346 * SUM(i.score * t.count)) + 5 * POW(2, (GREATEST(MAX(n.created), MAX(n.changed), MAX(c.last_comment_timestamp) || 1) - 1279444359) * 6.43e-8) + 5 * (2.0 - 2.0 / (1.0 + MAX(c.comment_count) * 1)) AS score FROM drupal_search_index i INNER JOIN drupal_search_total t ON i.word = t.word INNER JOIN drupal_node n ON n.nid = i.sid LEFT JOIN drupal_node_comment_statistics c ON c.nid = i.sid WHERE n.status = 1 AND (i.word = 'сайт') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 1) n1
Aug 13 14:36:55 mysuperserver postgres[24797]: [3-1] ERROR: operator does not exist: integer || integer at character 155
Aug 13 14:36:55 mysuperserver postgres[24797]: [3-2] HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Comments
Comment #1
jhodgdonI have seen this error reported on another project. Apparently PostgreSQL does not accept "1" as a boolean value to do queries like "WHERE 1" or WHERE "1 OR another_condition". You have to do WHERE 1 = 1 to get this to work. Similarly WHERE 0 doesn't work, you have to do WHERE 1=0.
So this is probably a real issue in the search mdoule. We will need to do some revision of the search query to get this to work in PostgreSQL.
Comment #2
jhodgdonupdating title to be more descriptive
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedI reopened the issue that broke this: #488166: Search relevance calculation fails if last_comment_timestamp is NULL
Comment #4
PMunn CreditAttribution: PMunn commentedWoo another PostgreSQL bug. Hi Damien, we last chatted on the thread ID getting too long bug, that nice one that's almost 4 years old! I'm seeing this too, all my searches fail to bring anything back.