Lines Matching defs:page
113 * Adds/updates the search index for the given page
117 * @param string $page name of the page to index
124 function idx_addPage($page, $verbose = false, $force = false)
126 $idxtag = metaFN($page, '.indexed');
127 // check if page was deleted but is still in the index
128 if (!page_exists($page)) {
130 if ($verbose) echo "Indexer: $page does not exist, ignoring" . DOKU_LF;
134 $result = $Indexer->deletePage($page);
147 if ($last > @filemtime(wikiFN($page))) {
148 if ($verbose) echo "Indexer: index for $page up to date" . DOKU_LF;
154 $indexenabled = p_get_metadata($page, 'internal index', METADATA_RENDER_UNLIMITED);
159 $result = $Indexer->deletePage($page);
166 if ($verbose) echo "Indexer: index disabled for $page" . DOKU_LF;
171 $pid = $Indexer->getPID($page);
173 if ($verbose) echo "Indexer: getting the PID failed for $page" . DOKU_LF;
178 $metadata['title'] = p_get_metadata($page, 'title', METADATA_RENDER_UNLIMITED);
179 if (($references = p_get_metadata($page, 'relation references', METADATA_RENDER_UNLIMITED)) !== null)
183 if (($media = p_get_metadata($page, 'relation media', METADATA_RENDER_UNLIMITED)) !== null)
187 $data = ['page' => $page, 'body' => $body, 'metadata' => $metadata, 'pid' => $pid];
189 if ($evt->advise_before()) $data['body'] = $data['body'] . " " . rawWiki($page);
194 $result = $Indexer->addPageWords($page, $body);
201 $result = $Indexer->addMetaKeys($page, $metadata);
209 io_saveFile(metaFN($page, '.indexed'), idx_get_version());