Thanks Pat !
In the meantime I have worked out the following, which is a slightly different approach to using the same variables.
1 : To focus your search on a single site. click the 'refine' line in a search result for that site, on the sitename. This then shows only the search results for that particular site. The interesting part is the site number ('site=' in the url).
2 : To focus the search on an area within a site, click the 'path' part of the refine line. This then shows only the results for that particular path (or directory). the 'path=' part of the url tells you how to express the path in a manner that phpdig will understand.
3 : You can then construct a URL to make phpdig carry out a search just on the one site, without too much trouble. Here's a sample line from my script
$weburl="http://hostname.ie/phpdig/search.php?refine=1&query_string=".$query."&site=15&limite=10&option=start" ;
where I pass a query from a search form to phpdig and tell it only to search site 15 on my index.
I haven't worked out how to tell phpdig to search multiple sites (e.g. to search sites 1, 2 and not 3 or 4) and I suspect that some extra code would be needed, including new parameters to the phpdigsearch() function.
I hope this is useful to someone.
In the meantime, thanks again to Pat.
Ciaran
|