A trie based rule engine that accepts tokenized queries