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

check_node_indexed()

Description

Function used to check if a fields' node needs (re-)indexing

Parameters

ColumnTypeDefaultDescription
$node array Individual node for a field ( as returned by get_nodes() )
$partial_index boolean false Partially index flag for node keywords

Return

void

Location

include/node_functions.php lines 1136 to 1155

Definition

 
function check_node_indexed(array $node$partial_index false)
    {
    if(
'' === trim($node['name']))
        {
        return;
        }

    
$count_indexed_node_keywords ps_value("SELECT count(node) AS 'value' FROM node_keyword WHERE node = ?", array("i"$node['ref']), 0);
    
$keywords                    split_keywords($node['name'], true$partial_index);

    if(
$count_indexed_node_keywords == count($keywords))
        {
        
// node has already been indexed
        
return;
        }

    
// (re-)index node
    
remove_all_node_keyword_mappings($node['ref']);
    
add_node_keyword_mappings($node$partial_index);
    }

This article was last updated 7th November 2024 20:35 Europe/London time based on the source file dated 28th October 2024 11:15 Europe/London time.