diff options
author | Tom N Harris <tnharris@whoopdedo.org> | 2011-01-24 03:46:11 -0500 |
---|---|---|
committer | Tom N Harris <tnharris@whoopdedo.org> | 2011-01-24 03:46:11 -0500 |
commit | f078bb0088870b4b68b348d546afa30a80a07e87 (patch) | |
tree | b212e16a10cc313f0f9f9596705c60c64c50674a /inc/fulltext.php | |
parent | bbc85ee4bc98fadf89707309f923f8ae2c16f727 (diff) | |
download | rpg-f078bb0088870b4b68b348d546afa30a80a07e87.tar.gz rpg-f078bb0088870b4b68b348d546afa30a80a07e87.tar.bz2 |
Indexer Rewrite v3: wildcards in lookupKey and automatically unwrap single result
Diffstat (limited to 'inc/fulltext.php')
-rw-r--r-- | inc/fulltext.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php index 35ee4ba34..f477e826e 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -130,7 +130,6 @@ function ft_backlinks($id){ $result = array(); $result = idx_get_indexer()->lookupKey('relation_references', $id); - $result = $result[$id]; if(!count($result)) return $result; @@ -234,8 +233,12 @@ function _ft_pageLookup(&$data){ $pages[$p_id] = p_get_first_heading($p_id, false); } } - //if ($in_title) - // $titles = $Indexer->lookupKey('title', "*$id*"); + if ($in_title) { + foreach ($Indexer->lookupKey('title', "*$id*") as $p_id) { + if (!isset($pages[$p_id])) + $pages[$p_id] = p_get_first_heading($p_id, false); + } + } } if (isset($ns)) { foreach ($page_idx as $p_id) { |