I guess you would need some sort of search term to document id mapping that gets downloaded to the browser but maybe there's something more efficient than trying to figure out what everyone might be searching for in advance?
And how would you do searching for phrases or substrings? I've no idea if that's doable without having a database server-side that has the whole document store to search through.