Function Fast_custom_index->index_for_search

Definitions

sources/database_search.php

  • Index a content resource.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: N/A

Parameters

Name Type Default Set Range Description
$db object required parameter N/A N/A Database connection
$index_table string required parameter N/A N/A Table containing our custom index
$content_fields array required parameter N/A N/A Map of content fields, field name to data (may contain fake fields)
$fields_to_index array required parameter N/A N/A List of field names from $content_fields that should be indexed for ngram tokens
$key_transfer_map array required parameter N/A N/A A map between content field keys to index field keys, so we can clear out old indexing for the content resource
$filter_field_transfer_map array required parameter N/A N/A A map between content field keys to index field keys, so we can fill out some of the filtering that goes inside the index
$total_singular_ngram_tokens ?integer Null N/A N/A Maintain a count of singular ngrams (typically words) in here (null: do not maintain)
$statistics_map ?array Null N/A N/A Write into this map of singular ngram (typically, words) to number of occurrences (null: do not maintain a map)
$lang ?LANGUAGE_NAME Null N/A N/A Passed content is for this specific language only (null: lookup for all installed languages)
$clean_scan boolean False N/A N/A If we are doing a clean scan and hence do not need to clean up old records