3 ms·
Redis rocks, but using it as a search engine does not rock at all IMO. For one thing - if the item changes then you have to update all the keys that hold refere
by alexro 16y ago
Redis rocks, but using it as a search engine does not rock at all IMO. For one thing - if the item changes then you have to update all the keys that hold references to that item.
EDIT: it's fine if your items are very small or do not change often
- adamcharnock 16y agoYes, there is a Caveat that if some words are removed from the database then you will need to reindex for that to be taken into account. However, in the case of bug tracking (which is largely what we are doing), data tends to be added rather than removed. Plus re-indexing happens on a project bases, not a global basis. Also, for our use case it is not necessarily a bad thing that removed words may cause an item to be shown in the results. After all, just because a paragraph was removed from a bug description doesn't necessarily mean it is invalid search fodder (bearing in mind that, in our case, full-text search is just one way of filtering).
- ryanpetrich 16y agoWouldn't you have to update any index you have whenever the content changes anyway (or lazily at some point thereafter)? Updating the index should be a simple as calculating the old metaphones, removing from the index, and then reinserting the key based on the metaphones of the new content (multi/exec would is perfect for this)
- petercooper 16y agoIt's also worth noting that the techniques shown could also be used for tagging, which would involve a lot less indexing in general (and search relevancy wouldn't be an issue either).