PDA

View Full Version : Limit search to this path returns no results


mixle
05-23-2005, 12:23 PM
Congrats on this wonderful application. It took quite a bit of work to get it fully configured, and working with external binaries to scan other doc types, but it is a dream once it is working properly.

In testing the search capabilities, I came across this 'bug'. It appears there is a problem with spaces in an address. The function works for most of the links, but paths with spaces in them return 0 results. Considering I am clicking on an actual results, you would think at least it would be returned.

This returns 0 results:

"limit search to this path : www/training/docs/training/Module 21 ver2.0/"

http://www.domain.com/www/search.php?refine=1&query_string=test&site=1&path=www%2Ftraining%2Fdocs%2Ftraining%2FModule+21+ver2.0%2F&limite=10&option=start

This returns results:

"limit search to this path : docs/implementation/Security/"

http://www.domain.com/www/search.php?refine=1&query_string=test&site=1&path=docs%2Fimplementation%2FSecurity%2F&limite=10&option=start


Regards,
Mixle

Charter
05-26-2005, 09:23 AM
Try the following and let me know if it worked...

In search_function.php find:

if (($path) && (strlen($path) > 0)) {
$wherepath = "AND spider.path like '$my_path' ";
}

And replace with:

if (($path) && (strlen($path) > 0)) {
$my_path = str_replace(" ","\%20",$my_path);
$wherepath = "AND spider.path like '$my_path' ";
}

mixle
05-30-2005, 10:24 PM
That seemed to do the trick. :)

Thank you for that.