PDA

View Full Version : Bars not working


harveyk
11-23-2005, 07:21 PM
http://bigcitypartners.com/nlpa/search/search.php?limit=10&order=high&query=the

I'm starting to install tdsearch, and the relevance bars do not seem to be working. Regardless of the relevance, the bars are always pic0_FFFFFF22229C.jpg (which is invisible)

Winston
11-23-2005, 10:10 PM
Hi, the tdSearch queries select relevance greater than zero, but the number zero in the image name means either a) that relevance greater than zero is no longer part of the queries, b) that relevance is passed as zero to the bar function, or c) that the following code is returning zero:

sprintf("%.2f",$data["relevance"]);

Also, if white on white is a problem, you can set the max and min colors for the bars in the config file.

harveyk
11-24-2005, 02:04 AM
So, I changed the color from white and the bars now show up. Thanks. But the relevance is still not working. All the bars are pic0, and no numerical values for relevance are showing up. I think the query is selecting the proper records from the database, so something is working. What do you think is happening? Doesn't seem like there's anything I could have done with the configure file to cause the relevance to not work. Have other people had this issue? Is it a bug? Is there some special version of MySQL or PHP that I need or some special settings? Thanks!

Winston
11-24-2005, 06:24 AM
Hi, sorry, I haven't heard of this issue before, so I'm not yet sure what is going on. What setlocale, common_word, and word_weight did you set in the config file?

harveyk
11-26-2005, 10:13 PM
All my settings are below. Important: there are only a few entries in the database now. Does that matter?

$show_bar_graphic = "on";
$max_color = "#FA9C00";
$min_color = "#FFE6BB";
$common_word = "51";
$word_weight = "0.2";
$today = gmdate("j M Y, g:i:s")." GMT";
$chars_to_bld = "2";
$chars_to_ign = "2";

Winston
11-27-2005, 02:11 AM
Okay, thanks, found the problem. Either a) apply the attached patch or b) download the tdSearch archive again, FTPing just the tdSearch.php file, overwriting the old tdSearch.php file.

harveyk
11-27-2005, 07:46 PM
Perfect. Thanks for the quick action. Works fine now...