mbland / custom-links

An application for allowing authenticated users to create and dereference custom URLs hosted on a custom domain.
ISC License
7 stars 1 forks source link

redis: Add link, target completion & target search #170

Closed mbland closed 6 years ago

mbland commented 6 years ago

Part of #160, #161, #165, and #166. Implements the RedisClient operations necessary to support these search, autocomplete, and target collision features.

Uses the lexicographic completion approach described in: http://oldblog.antirez.com/post/autocomplete-with-redis.html

Note that we'll need a migration script to create the new search indexes for existing installations.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.09%) to 98.153% when pulling 41dd7ee589f722b0a5e6b6173ca924669427e314 on autocomplete-and-target-search into 59f1017a1b80807ffa70b0fcbb6792d489c3ee96 on master.

mbland commented 6 years ago

BTW, this PR only adds items to the search corpora; I've filed #172 to follow up with removing them when links are deleted.

mbland commented 6 years ago

The Code Climate coverage check is failing, but I think it's faulty. The "Details" link shows no details, and Coveralls shows a small increase in coverage. Ignore the failure.

mbland commented 6 years ago

I've decided to eliminate the target URL autocompletion, as I think that would get messy in a hurry and isn't as useful as a regular search.

I've also:

I'm going to go ahead and merge to get things moving along, but feel free to comment, ask questions, or open a new issue if there are any concerns.