Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

update_node_hitcount_from_search()

Parameters

ColumnTypeDefaultDescription
$resource
$search

Location

include/resource_functions.php lines 7886 to 7899

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 15th December 2024 19:05 Europe/London time based on the source file dated 13th December 2024 14:45 Europe/London time.