Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

update_node_hitcount_from_search()

Parameters

ColumnTypeDefaultDescription
$resource
$search

Location

include/resource_functions.php lines 7617 to 7630

Definition

 
function update_node_hitcount_from_search($resource,$search)
    {
    
// For the specified $resource, increment the hitcount for each node that has been used in $search
    // This is done into a temporary column first (new_hit_count) so existing results are not affected.
    // copy_hitcount_to_live() is then executed at a set interval to make this data live.
    // Note that from v10 the resource_keyword table is no longer used
    
$nodes = [];
    
$notsearchednodes = [];
    
resolve_given_nodes($search$nodes$notsearchednodes);
    if (
count($nodes)>0)
        {
        
update_resource_node_hitcount($resource,array_column($nodes,0));
        }
    }

This article was last updated 19th March 2024 05:05 Europe/London time based on the source file dated 11th March 2024 14:25 Europe/London time.