For each search query, we don't need to be passing around an array of objects of search docs. Instead, let's just pass back and forth a list of the doc._ids that match. Much easier everywhere, and that way we're not keeping track of two separate arrays: data.results and docs.
For each search query, we don't need to be passing around an array of objects of search docs. Instead, let's just pass back and forth a list of the
doc._id
s that match. Much easier everywhere, and that way we're not keeping track of two separate arrays:data.results
anddocs
.