Collections functions
General functions
Render functions
Theme permission functions
Resource functions

update_node_hitcount_from_search()

Parameters

ColumnTypeDefaultDescription
$resource
$search

Location

include/resource_functions.php lines 7085 to 7098

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 3rd October 2022 12:35 Europe/London time based on the source file dated 30th September 2022 14:20 Europe/London time.