Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-10-14 14:56:07

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 218
Website

Sort by txp:search_result_excerpt count

Search results in Textpattern are rendered (and sorted) by txp:article. How to sort results by density of the queried keywords? The flexible layout usually would look more consistent and logical: az.on.lt/?q=pirm.

Offline

#2 2019-10-14 16:12:39

etc
Developer
Registered: 2010-11-11
Posts: 3,713
Website

Re: Sort by txp:search_result_excerpt count

It actually does sort them by relevancy, but MySQL MATCH ... AGAINST construction used as score works rather unpredictably in my tests.

Online

#3 2019-10-14 16:17:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,502
Website

Re: Sort by txp:search_result_excerpt count

Yeah, unsure how to fix this. From memory, it should default to sort="score desc" (or score asc ??) for search results, but that may be wishful thinking. If not, does setting that manually in your search result article make any difference?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#4 2019-10-14 16:31:32

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 218
Website

Re: Sort by txp:search_result_excerpt count

Bloke wrote #319707:

it should default to sort="score desc" (or score asc ??) for search results, but that may be wishful thinking. If not, does setting that manually in your search result article make any difference?

Tried — with no difference…

Offline

Board footer

Powered by FluxBB