1. A method for indexing at least one string over a language having a vocabulary and a grammar, comprising: dividing, for each string, that string into a plurality of component parts according to the grammar; determining a bit index for each component part; and unioning, for each at least one set of component parts, the bit indices of the component parts within that set of component parts into a bit index for that set of component parts.