While structured documents aren't intended for massive "galactic" searches across the document universe, docs will need to be at least somewhat galactically searchable. To support this, one can create indexes on the document universe, on "scalar" columns in records (ie, you can't index a column of record type). These indexes will be "sparse" in that if no records of the indexed type exist in a document, it won't have an entry in the index.
Within documents, pre-defined dynamic indexes are built when the doc is initially loaded. These indexes are, as above, on "scalar" columns, not
Initially, we'll support in-memory "equality-only" indexes will be of the "indexed hash" type, meaning a hash value is stored in the index itself, and only if the hash matches will the value itself be fetched and checked for equality. This will be a fairly expensive operation so we'll allow longish hash values.