5 ms·
We had a similar problem at http://www.formspring.me/ http://www.formspring.me/ when we wanted to implement a search feature somehow similar to Facebook search.
by iampims 15y ago
We had a similar problem at http://www.formspring.me/ http://www.formspring.me/ when we wanted to implement a search feature somehow similar to Facebook search.
Our main application stack suffers from the same symptoms, robust, but slow-ish.
After lots of thoughts, and because we knew how often the data would change, we came up with a solution of generating an index per user stored in s3 and retrieved from the client via JSONP.
The text matching and sorting is all done client side and the search feels fast.
If your data doesn’t change in an unpredictable way and with no concurrency issues, building indexes (json blobs) at write time is a strategy that'll get you pretty far.
Let me know if you want more details about our implementation, I'll be happy to share.
- chrisacky 15y agoThis reminds me of MySpace's method for searching messages by downloading as much as they could to the client and storing in local storage. Unfortunately for me, as mentioned (in my second response), I need to search over 6million place names, and then I need to take the result of these locations, and figure out the number of documents that have been "Tagged" as being inside of them to display an interface such that you have place name followed by item count. I could definately save a small selection of the first XXX possibility locations though. And regenerate this every day to reflect recent changes.