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_query($string);
$search->set_sort('swishrank desc swishdocpath asc');
$results = $search->execute();
--------------------------------------------
Thanks!
Dennis
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Thu Apr 2 16:56:51 2009