Coroico / AdvSearch

Dynamic content search add-on for MODx Revolution that supports results highlighting, faceted search and search in custom packages
21 stars 14 forks source link

FieldPotency applied per page not for all the results #27

Open Coroico opened 12 years ago

Coroico commented 12 years ago

The sort order by score (fieldPOtency) is done after the pagination. So only the result of a page are ordered by fieldPotency.

adamwintle commented 9 years ago

I've been trying to get this parameter to work, but so far without luck.

Is the correct parameter to sort by the potency &sortby=fieldPotency? On [this forum post](http://forums.modx.com/thread/82112/advsearch-1-0-0-pl2-fieldpotency-not-working-at-all#dis-post-497304), @matdave has pointed out `&sortyby=`score DESC works for him, however this also doesn't work for me.

Is there any other config or settings needed to get sort by potency to work?

vierkantemeter commented 8 years ago

I'm also having trouble with sorting by the fieldpotency parameter. All previous suggestions don't work for me. When I look at advsearchresults.class.php it seems that the fieldpotency should automatically be the sort method if that parameter is added to the snippet call, however it's not working like that apparently.

EDIT: I just realized it works if you just leave the sortby parameter out! I was confused because my fieldpotency settings made the score different than I thought. At least, it looks like the number of times the search term appears in a field also makes a difference.