PDA

View Full Version : Blank results are being returned


MonoNexo
01-05-2004, 05:56 PM
Howdy. I may have caused this, because I can't find a record of this occuring in any other post.

Anyway, I'm getting search results that are blank. Example:

http://search.aodojo.com/search.php?browse=1&query_string=saga&limite=10&option=start&lim_start=10

You will see a few times on the search results "- 0.0 k"


How I may of caused this: The search engine is going to be independently linked, and also linked through a 404 error, reading the attempted url and parsing it through the engine to find a good match. If it finds a "Direct Hit" verbatim, it will redirect there, if it doesn't find it verbatim, it will suggest the page, then display the rest of the search results. An example of this can be found by going to http://search.aodojo.com/ and searching "ships" That is a non-verbatim return. If you search "ship" it will redirect you instantly to the ships page.

Why I don't think I caused this: I didn't touch anything mySql, and I didn't mess that much around in the files... I had 5 sites on index, and deleted 4 and left the big one, the root aodojo.com. Deleting these sites did nothing in removign the odd results.

Charter
01-06-2004, 01:21 AM
Hi. Are there any files in the text_content directory that have zero filesize? If you can run grep -ci saga * from shell, how many files in the text_content directory have at least one instance of saga?

MonoNexo
01-06-2004, 03:56 AM
No, the smallest is 274 b though. I have shell access, never used it on this account though so I'll need to wait a day or so for them to enable it. I'll get back to you then.

MonoNexo
01-07-2004, 02:31 PM
Apperently 67.

Charter
01-09-2004, 04:32 AM
>> You will see a few times on the search results "- 0.0 k"
>> No, the smallest is 274 b though.

Hi. Try running the following query:

select count(*) from spider where filesize = 0;

What is the output?

MonoNexo
01-09-2004, 08:47 PM
SQL result
Host: localhost
Database : mononex_phpdig
Generation Time: Jan 09, 2004 at 11:47 PM
Generated by: phpMyAdmin 2.5.2
SQL-query: SELECT count( * ) FROM spider WHERE filesize = 0;

count( * )
0

Charter
01-11-2004, 07:01 PM
Hi. It seems that the results that are getting unset somehow might wind up back in the search results. What text output do you get if you do the following in search.php and then search on saga?

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

print_r($my_test_array);

MonoNexo
01-12-2004, 03:45 AM
Nothing out of the ordinary. Perhaps I inserted it wrong into search.php?

<?php
/*
--------------------------------------------------------------------------------
PhpDig Version 1.6.x
This program is provided under the GNU/GPL license.
See the LICENSE file for more information.
All contributors are listed in the CREDITS file provided with this package.
PhpDig Website : http://www.phpdig.net/
--------------------------------------------------------------------------------
*/
$relative_script_path = '.';

include "$relative_script_path/includes/config.php";
include "$relative_script_path/admin/debug_functions.php";
include "$relative_script_path/libs/search_function.php";

// extract vars
extract(phpdigHttpVars(
array('query_string'=>'string',
'template_demo'=>'string',
'refine'=>'integer',
'refine_url'=>'string',
'site'=>'integer',
'limite'=>'integer',
'option'=>'string',
'search'=>'string',
'lim_start'=>'integer',
'browse'=>'integer',
'path'=>'string'
)
));
phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, $template);
$my_test_array = phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, 'array');
print_r($my_test_array);
?>

Charter
01-12-2004, 03:59 AM
Hi. That looks fine. It didn't return any blank results? What template are you using?

Charter
01-12-2004, 04:34 AM
Hi. I tried dojo.php as my template. Of course, I can't get the actual PHP but the HTML output from dojo.php seems to work okay. Can you set your search up so dojo.php is just the HTML from http://search.aodojo.com/templates/dojo.php and then search on saga? Does it still return blank results?

MonoNexo
01-12-2004, 12:42 PM
I changed it to dojo.html. I hadn't added any php to the layout yet, but it is changed to .html now.

Blank results are still being returned.

Matt

MonoNexo
01-12-2004, 12:44 PM
Should I just try reinstalling phpdig?

Charter
01-13-2004, 03:25 PM
Hi. Where any blank results returned when you used print_r($my_test_array); in the search.php file?

Also, what happens if you use the below template?

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
.phpdigHighlight {font-weight:bold;}
</style>
</head>

<body bgcolor="white">
<font face='arial,helvetica'>

<phpdig:form_head/>
<phpdig:form_field/>
<phpdig:form_button/>
<phpdig:form_foot/>
<br />
<font size="2">
<b><phpdig:result_message/></b>
<br /><i><phpdig:ignore_message/></i>
<br /><i><phpdig:ignore_commess/></i>
</font>

<phpdig:results>
<p>
<phpdig:page_link/><br />
<font size='2'>
<phpdig:text/>
</font>
<br />
<font size='2' color='green'><phpdig:complete_path/> <phpdig:filesize/> k</font>
</p>
</phpdig:results>

<p align='center'>
<font size="2"><phpdig:nav_bar/></font>
</p>

</font>
</body>
</html>

MonoNexo
01-13-2004, 05:42 PM
The print_r thing did not remove the blank results.

The updated template did not remove the blank results, although it did as some interesting things at the bottom of the page. Your template is still in use if you wish to look.

Charter
01-13-2004, 06:26 PM
Hi. Thanks, feel free to put your template back in place. Did you make any mods to the search_function.php file? If so, can you attach the file in a post?

MonoNexo
01-13-2004, 06:32 PM
As far as I recall, the only changes I made were to add the code:

If(eregi("ship", $query_string)) {
if($query_string == "ship") {
Header('Location: http://www.aodojo.com/athen_ships.php');
}
$directhit .= "<br>Did you intend the page <a href='http://www.aodojo.com/athen_ships.php'>Ships</a>?";
}
If(eregi("archive", $query_string)) {
if($query_string == "archive") {
Header('Location: http://www.aodojo.com/lore_archives.php');
}
$directhit .= "<br>Did you intend the page <a href='http://www.aodojo.com/lore_archives.php'>Alyria Online Archives</a>?";
}
If(eregi("race", $query_string)) {
if($query_string == "race") {
Header('Location: http://www.aodojo.com/fund_races.php');
}
$directhit .= "<br>Did you intend the page <a href='http://www.aodojo.com/fund_races.php'>Races</a>?";
}

$result_message = $result_message . $directhit;

(Yes, I know there are better ways to code that, but it gets the job done.)

MonoNexo
01-18-2004, 03:42 PM
Hmm. I fixed it. There were 5 page url's under Spider in the db. I deleted these, 1 by 1 and refreshed the search results. Every page I deleted removed one of the 5 blank results. I deleted all 5, and they all went away.


Too bad I unistalled the entire thing, and purged the db... especially when I had to manually make the db :(

Charter
01-19-2004, 07:54 AM
>> There were 5 page url's under Spider in the db.

Hi. Do you happen to know how they were left there? They should have been deleted from the spider table when delete site was clicked in the admin panel. Were they all for subdomains?

>> Too bad I unistalled the entire thing, and purged the db...

:(

MonoNexo
01-19-2004, 08:04 AM
They were part of the subdomain tracker.aodojo.com which was the first site I deleted when I was trying to track the problem.

I have a hunch that they were left when I had to cancel the crawling of that page. I had forgotten that there were 5 r****m links placed on the bottom of every page :O. These links linked to pages that also have 5 r****m links (all the links linked to one of 12k player profiles.... i don't think I'll ever crawl that page again :O). Oops :o.

Charter
01-19-2004, 08:11 AM
Hi. Okay, thanks. Glad it's working now. :)