cozy / cozy-contacts-v2

Contact books manager for Cozy
http://cozy.io
GNU Affero General Public License v3.0
20 stars 20 forks source link

Limit search to a median result #222

Closed m4dz closed 8 years ago

m4dz commented 8 years ago

When doing a free-typed search, search results are sorted by a score, computed from the matching pattern. As long as you type, your search'll be more accurate, so first results tends to have a high score. To limit noise with end-list containing irrelevant search results, I suggest we limit the results to ½ of the higher score if this one is higher than 5.

Example

We make a search on the string example. If the first result have a score higher that 5 (say 30), we cut the results list to items with a score <= 15.

poupotte commented 8 years ago

Fix on new version (2.1.6). Thanks @m4dz !