Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Minor bug found @ SEARCH

Quote Reply
Minor bug found @ SEARCH
Well... I'm not sure if this has discussed before...
I found 2 minor problems at search:
1. When search something as a phrase, it will only work for links but not categories.
eg. search "linux and unix" as a phrase, only links with exact match (ie. Welcome to Linux and Unxi World) would return but not categories with exact match (ie. Computer: Linux and Unix). If we want the category "Computer: Linux and Unix" to return as a result, we need to put in "linux_and_unix" at the search field. I think you can fix this by using the non-eng mod.

2. When search return any categories and 0 links, the <%link_hits%> will return nothing (not even the amount "0"). And this causes the statement "Your search returned x Categories and x Links." looks wried.
eg. let say some search return 3 categories and 0 links, the statment becomes "Your search returned 3 Categories and Links." instead of "Your search returned 3 Categories and 0 Links." And this one I don't know how to fix it.

Robbie

[This message has been edited by Robbie (edited September 11, 1999).]
Quote Reply
Re: Minor bug found @ SEARCH In reply to
1. It doesn't do exact word matches on the category because it doesn't search the category database. Only the Links Database and the categories listed there. In the search script, you can convert spaces to underscores, but that will mess up the link search. Anyway, i don't know.

2. When i get 0 hits, the search shows zero, but if it doesn't work for you, go to the resource center and install the Enhanced Template.pm, then in you search results or error page say <%ifnot links_results%> 0 <%endif%>
Actually, you don't need the enhanced one, but if you wanted to get it, you could also say <%if link_results < '1'%> 0 <%endif%> or <%if link_results eq '0'%> 0 <%endif%>

[This message has been edited by Bmxer (edited September 11, 1999).]
Quote Reply
Re: Minor bug found @ SEARCH In reply to
Thanks for your reply Bmxer. Well...
Quote:
It doesn't do exact word matches on the category because it doesn't search the category database.
1. Maybe I shoudn't say this is a bug. However, what makes me think this is a bug when I 1st see it is that all the other cgi search-scripts on the net do category searching. So I wonder why wouldn't Links-Search does it too? Anywayz, I just learned that it just doesn't.

Quote:
When i get 0 hits, the search shows zero
2. Good for you! Before I post this problem here, I've looked at more than 3 other sites that use LINKS and have the same problem as me. Well, you just remind me to use <%ifnot> to fix this problem I have. Thank you Smile

1 4 the community,
Robbie