PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 05-26-2004, 11:54 AM   #1
ciaran@clissman
Green Mole
 
Join Date: May 2004
Posts: 10
Question Many sites indexed - how to restrict search results to just one or two ?

Hi folks,

I've happily indexed a couple of dozen sites. Now I want to search my index, but return results from only a subset of the sites that I have indexed.

For example, I've indexed site1, site2 and site3. My user comes along and only wants search results from site2 and site3.

I'd like to implement this by calling a php script with url "blah.php?site1=0&site2=1&site3=1", and then make the appropriate calls to phpdig.

What are those calls, and are they documented ? The documentation lists the paramters for the phpdigsearch() function, but not what they are...

phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, 'array')

Any assistance most welcome!

Ciaran
ciaran@clissman is offline   Reply With Quote
Old 05-26-2004, 06:02 PM   #2
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
This thread might be useful. You can skip the first part of it, as it's just telling you how to restrict spidering to a specific directory, which it sounds like you've already done. The sample html is what you want to look at.

Hope it helps.
vinyl-junkie is offline   Reply With Quote
Old 05-27-2004, 02:11 AM   #3
ciaran@clissman
Green Mole
 
Join Date: May 2004
Posts: 10
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
ciaran@clissman is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
List how many Sites have been indexed? Dan Mod Requests 1 11-17-2006 07:00 AM
Certain sites, pages and pdfs are not indexed 1.8.9 RC1 [Workaround included] obottek Bug Tracker 0 08-24-2006 06:30 AM
show sites indexed richwilson How-to Forum 2 04-06-2006 05:31 PM
Nothing indexed on some sites tryangle How-to Forum 3 05-02-2004 01:31 PM
returning results of internal & external sites tryangle How-to Forum 2 04-17-2004 07:04 PM


All times are GMT -8. The time now is 09:27 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.