Using Aerospike for Search Bar Autocomplete


I’m trying to use Aerospike for autocomplete and content matching basically in the exact same way it’s being used in various places on this forum. I have two use cases, both of which I can see in action but I don’t know how to do:

  1. Users type the name of an existing project in the search bar, and the a list of autocomplete suggestions appears below as they’re typing. The search bar on this forum works this way, and I’m assuming it’s pulling this data from an Aerospike cluster. What’s the most efficient way to query strings like this in Aerospike? Does the entire dataset have to be in RAM to do this effectively? Or maybe the entire string dataset is pulled into a big corpus in memory for n-gram searching? What’s the best way to do it with only the index in RAM and all the autocomplete suggestions pulled from SSD?

  2. Users type the name of a new project and similarity suggestions appear. When creating a new topic on this forum, a “Your topic is similar to…” box shows up that does exactly what I’m trying to do. I have various content similarity matching libraries, but I can’t figure out how to efficiently pull string data from Aerospike to serve as the comparison against what the user is typing. How is the best way to do this using Aerospike with index in RAM and data on SSD?

Basically I guess I’m just asking the most efficient way to query string bins in SSD. Anyone done this type of thing before?