This function is not present in Drupal 7.

The call is made in apachesolr_stats.module in function apachesolr_stats_block_frequent_keywords.

CommentFileSizeAuthor
#2 db_api-1350384-2.patch840 bytesjanusman
#1 db_api-1350384-1.patch841 byteseddie_c

Comments

eddie_c’s picture

Status: Active » Needs review
StatusFileSize
new841 bytes
janusman’s picture

Status: Needs review » Closed (fixed)
StatusFileSize
new840 bytes

Eww.

Your patch is on the right track; however I found an additional bug introduced during the port to 7.x which is also fixed in the attached patch.

Committing this. Thanks!

eddie_c’s picture

Thanks for fixing this janusman. I realise now I'd set the wrong range count in the query below.

$result = db_query_range("SELECT keywords FROM {apachesolr_stats} WHERE
numfound > :numfound AND timestamp > :timestamp
ORDER BY timestamp DESC", 0, 5000, array(':numfound' => 0, ':timestamp' => $timestamp));

Just wondering though - why set a limit on the number of results returned at all? Will this not introduce some inaccuracy in the count if there is a really large number of searches made in the last week?