Welcome! Log In Create A New Profile

Advanced

How to search websites? (with www.)

Posted by netul 
How to search websites? (with www.)
March 25, 2007 02:46AM
If I search for example: www.netul.ro , there are no results for this search, even if the site http://www.netul.ro was indexed.
But if I search for: "netul", the results contan www.netul.ro
Problems:
1. How can I change the script to search if any website was indexed and to apear in search results.
2. If I search for "example", I want that www.example.com to be first search result, followed by others results.

http://www.netul.ro - Romanian portal
http://director.netul.ro - Romanian web directory
Re: How to search websites? (with www.)
March 27, 2007 06:25AM
No answers? sad smiley
Tec
Re: How to search websites? (with www.)
March 27, 2007 07:22AM
Hi,
already published in the old forum.
Open:
/admin/spiderfuncs.php
Search for:
$file = preg_replace("/[\*\^\+\?\\\.\[\]\^\$\|\{\)\(\}~!\"\/@#?$%&=`?;><:,]+/", " ", $file);
As you may notice, every dot is removed from spidering and so not able to be found by a search query.
Replace the above row by:
$file = preg_replace("/[\*\^\+\?\\\[\]\^\$\|\{\)\(\}~!\"\/@#?$%&=`?;><:,]+/", " ", $file);
Now re-index everything and you will be able to search for www.abc.de
Weighting is not jet influenced by this change.
Tec
Re: How to search websites? (with www.)
March 27, 2007 10:32AM
I must reindex all sites before the changes takes effect?

And 2. How can I modify weight to have www.example.com to be first search result if I search for "example"
Tec
Re: How to search websites? (with www.)
March 27, 2007 12:31PM
>>>I must reindex all sites before the changes takes effect?

Yes, you have to reindex. Modification is done in spiderfuncs.php This script is used only during indexing. Afterwards your database will hold strings including dots. Then you will be able to search for.

>>>And 2. How can I modify weight to have www.example.com to be first search result if I search for "example"

Log in as 'admin'
Select 'Settings'
Modify 'Weights' at the end of the table concerning your requirements. But pay attention: To play here will influence all your result order.

Additional information:
Using the modifided script as I posted before, will also enable the Suggest Framework (as side-effect) to show the URL of the sites you indexed. After typing htt or www as beginning of any search query, the Suggest Framework will show as many site domains as you selected as 'admin' in 'Limit number of suggestions'. If this doesn't disturb you, stop reading here.

If your indexing should remain your own knowledge and not to be seen by any visitor of your site:
Open:
/include/js_suggest/suggest.php
Include starting at row 24 as new rows:
if (eregi("htt|www",($_GET['q'])))
{
$suggest_phrases = false;
$suggest_keywords = false;
}

Now the Suggest Framework is disabled to show the URL of the sites you indexed.

Tec
Sorry, only registered users may post in this forum.

Click here to login