Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Search priority

Quote Reply
Search priority
Hi, I'm new in this forum, and I start with this interesting question:

- I added "Priority Field" in Links database.
I set
$LINKS{build_sort_order_search} = "Priority,Title,Description";
$LINKS{build_sort_order_category} = "Priority,Title";

I assigned on each link in the database priority "10" for all, and "0" for best.

When I "Build all", really links with lower priority come to the top of page in static pages;

But when I make search, the order of output is respected only inside the category where I make search, but global search is sorted by Alphabeth Order of categories. I tried also to get ride off from Categories suddivision, commenting $link_results .="<p>" . ..... in search.cgi but nothing better happend.

Hope someone can help me, if someone understand my fantastic english... :-)

Quote Reply
Re: Search priority In reply to
I'm not sure if you mean HIGH is 10 and LOW is 0, but you would need to sort

$LINKS{build_sort_order_search} = "Priority DESC,Title,Description";
$LINKS{build_sort_order_category} = "Priority DESC,Title";

DESCending (Higher to lower)

Also, the build_sort_order_search has a problem, in that results are returned in 'score' order, meaning "most relavent" on the "weights" assigned to the various fields.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Search priority In reply to
Thanks for quickly reply.

Do you know how I can manipulate "score" of results? For me the only problem is to remove the grouping on categories/subcategories in search results... I think is not so hard to have results not "grouped"... But I'm not able to do this!!! :-))


Quote Reply
Re: Search priority In reply to
I had asked Alex that when the program first came out (1.1x code) and he said it wasn't possible, really. It had been designed in, and needed to be designed out.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ