Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] partial indexing

From: Zhou Xiang <xiz407(at)>
Date: Thu Apr 02 2009 - 20:56:52 GMT
Hi all,

If i want to do limited search, say, search within "Title" or some meta
fields, can i do it like this --
Can I index all the contents in the page including the metadata in the
source file to form one index file.
Then i use PHP functions to limit search fields.

If it woks, what are those PHP functions?
The following does not work:
$word = $_GET['text'];
$metafield = $_GET['field'];
$stem = $swish->stem($word);
$index_names = $swish->index_names();
$search = $swish->new_search_object($word);
$string = $metafield . '=' . $word;
$search->set_sort('swishrank desc swishdocpath asc');
$results = $search->execute();



Users mailing list
Received on Thu Apr 2 16:56:51 2009