This is a poor man's in-memory full text index in JavaScript.