Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Adding additional field to the search results?

Quote Reply
Adding additional field to the search results?
Hi,

how do i configure, what fields are used and displayed on the result page by the search function?

Thanks for hints!

Quote Reply
Re: Adding additional field to the search results? In reply to
If you want a different view of links in your search result page than what is in the category pages....You will have to do the following:

1) Replace all occurrences of &site_html_link in the search.cgi with sub site_html_search_link.

2) Then create a new subroutine in the HTML_Templates.pm file called sub site_html_search_link. Don't forget to add &site_html_search_link at the top GLOBALS section of the file. This new subroutine should be a copy of sub site_html_link but you will load searchlink.html rather than link.html file.

3) Then create a new file called searchlink.html and put it in your templates directory. Make sure that you change the permission (chmod) of this file to 666 (rw-rw-rw-).

That should do it.

Regards,

Eliot Lee

Quote Reply
Re: Adding additional field to the search results? In reply to
Eliot,

thanks for your instructions ... very helpful!

A basic question: Where do i find the definitions, what fields are searched by the search routine? If I add additional fields, where do i have to tell links, that it should look into them if anyone's searching?


Quote Reply
Re: Adding additional field to the search results? In reply to
In Reply To:
Where do i find the definitions, what fields are searched by the search routine? If I add additional fields, where do i have to tell links, that it should look into them if anyone's searching?
This is ALL controlled by the weights you set via the Edit Field Definitions via the editor.cgi that is linked in the admin.cgi file.

Setting the weights above 0 will index that field.

Regards,

Eliot Lee