Forum Moderators: phranque

Message Too Old, No Replies

Problems with Search Engine script on my site

when doing a search, results grab info i dont want shown

         

ericf451

3:39 am on Jul 14, 2003 (gmt 0)

10+ Year Member



Basically the way its set up now, if someone does a search on my site, even the content of an image path shows up. I dont know if this makes sense to anyone but let me show an example.

Search ( myname ): results for titles/website names show up which is fine, but if a listing has a pic on it, the actual path of the pic file shows too... hxxp://www.somesite.com/mynameimages/myname_image1.jpg

This is not only bad because it shows my folders if someone happens to do the "wrong" search, but for some weird reason "pulls apart" my images in the description fields. Instead of showing results with the title and description and image all looking nice, it shows the little "x" instead of my image and tears it apart showing nothing but its file path.

Does this makes sense to anyone? I know i shouldn't place images in my directory's site description field but it makes for a nice detailed listing with pics of things.

[edited by: JamesR at 4:56 pm (utc) on July 14, 2003]
[edit reason] changed to generic url [/edit]

DaveAtIFG

3:19 pm on Jul 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld ericf451! :)

You didn't mention what search script or server you're using... That makes it difficult to offer ideas. ;)

In any event, the best source for information is usually the support offered by a script's creator. And many search scripts are configurable in various ways, perhaps you could limit what directories or files are searched, check the documents that came with your script.

If it's a popular and commonly used script, there may be other users here that can offer suggestions.

[edited by: DaveAtIFG at 12:27 am (utc) on July 16, 2003]

Damian

8:19 pm on Jul 15, 2003 (gmt 0)

10+ Year Member



Do you highlight (or change color of) the searchterms on your results page?
Sounds like that feature breaks the html that normally shows the image with the description in that case.

ericf451

10:46 pm on Jul 16, 2003 (gmt 0)

10+ Year Member



Actually, you are correct. The program seems to highlight the found results. In that case it displays it everywhere it can find it! If i can disable this are you thinking it won't bring out the word in the pathnames? That would be so awesome!

I'm using scripts from Aleza. They offer software that gives rating, comments and search options for you site. I also found some other things under aspin.com since i'm in ASP development. So if thats not the answer and i can't figure out how to limit the search to certain columns in my databas, then i'll just use those. Thanks for any help you may have or have already given!

Eric

Damian

12:53 pm on Jul 17, 2003 (gmt 0)

10+ Year Member



>If i can disable this are you thinking it won't bring out the word in the pathnames?

Yes :)
I don't know the script you mention but it'll probably be an option in your admin area.

Limiting the fields that are searched might get you less relevant results..
Another possible solution is to not highlight found words when they occur inside html elements. I don't know asp so you would have to ask someone else for a code example to make this happen.

In Perl a possible approach is to first have the script highlight every search term (as it does now)..and then make a correction for every search term that is highlighted but where the search term plus the highlight tags are surrounded by html tags.

ericf451

11:52 pm on Jul 17, 2003 (gmt 0)

10+ Year Member



OMG thank you a million! I finally found the code that did the highlight!

if navfunc = "search" then
myTitle = highlight(myTitle, words, wCount, hcolor)
myDesc = highlight(myDesc, words, wCount, hcolor)
end if

I just basically deleted it and now the search works and keeps the pic untouched and the links untouched!

WOW i'm so happy haha.. this is such a great forum

Thank you again!

ray1234

4:56 am on Jul 28, 2003 (gmt 0)



This problem seems to be pretty common in many search scripts that feature highlighting.

If you are after another search script/solution that doesn't break HTML while highlighting, you might want to take a look at the Zoom Search Engine [wrensoft.com] (... I can be pretty sure it doesn't break HTML, because I contributed that part of the code :))