Systems and methods for indexing and searching the inner structure of a
string over a language having a vocabulary and a grammar using bit
vectors. The index preserves the inner gramatical structure of the string
while allowing for a fast search. A single search provides immediate
access to every level of a document, without having to re-search a single
string to determine which sub-parts of that string match the search
string. When a string is indexed, the index maintains a compositional
representation and the grammatical relationship between the elements of
the vocabulary according to the language. The string is then indexed on
different levels by disregarding some of the grammatical relationships of
component levels.