joomla / install-from-web-server

Repository holding the component powering the Install from Web server.
9 stars 31 forks source link

Search results are not sorted by relevance of search term #33

Closed beat closed 6 years ago

beat commented 9 years ago

Try searching an extension by its name:

Results will be returned sorted by Score instead of sorted by relevance (aka unsorted).

The search results should not be sorted at all when searching a term, and leave the relevance sorting of JED.

On JED the search results show the right extension first.

(In JED2-installfromweb we did sort by name matches first, then by descriptions)

zero-24 commented 9 years ago

The value is hard coded here: https://github.com/joomla-extensions/install-from-web-server/blob/master/components/com_apps/models/category.php#L49

beat commented 9 years ago

That's the default ranking, before search too, which is ok.

But when doing a new search we should set ranking at same time to "By search relevance" (or "no ranking" to get the default ranking on searches ?) whatever JED API needs or provides us, so that results are sorted same way as on a search on JED. (or at least show results by name first, then by results in description, each by rating (although I'm not a fan of ratings sorting, as ranking is not weighted by number of votes).

PR welcome :-)

zero-24 commented 9 years ago

i can't see a setter method so is guess it is allways this value if nothing is selected.

https://github.com/joomla-extensions/install-from-web-server/blob/master/components/com_apps/models/category.php#L184-186

But maybe i only understand the server not correct.

dgrammatiko commented 9 years ago

@beat If you search for multiple words (one or more spaces in place) the results are really unpredictable

mbabker commented 6 years ago

Fixed by adding a sort option for "unsorted" (or whatever JED's default is, I guess it's relevance). I've now got about 10 different searches where the results align with the JED's full page search.