How do I show 1 result per domain?
May 25, 2015 03:20PM
Hiya. Firstly, this is a great script. Thank you so much for making it available!

I'm trying to get my search engine to only show 1 (the most relevant) search result for each domain in the index.

I've tried a few options in the search results PHP file but I just can't figure it out.

Does anyone know how to do this?

Thank you
Tec
Re: How do I show 1 result per domain?
May 25, 2015 04:33PM
Open the admin backend of your Sphider installation, and in 'Settings' menu select:
Show only the 2 most relevant links from each site

Now open in your editor the script
…/include/searchfuncs.php
and find the row
} else if ($domains_to_show[$domains[$key]] == 1) {

Delete this row and replace it with
} else if ($domains_to_show[$domains[$key]] == 0) {

By the way: The option 'Show only the 2 most relevant links from each site'
will not work probably on several localhost installations.
Because the original Sphider does not encounter
http://localhost/public/sphider-original/
and
http://localhost/public/sphider-plus/
as different domains.

Tec
Re: How do I show 1 result per domain?
May 26, 2015 09:03PM
Hi Tec. Really appreciate your help - thank you.
Sorry, only registered users may post in this forum.

Click here to login