Add tests for indexer module and fix subtle issues

The issues were regarding comparing str vs. bytes and handling
additional values in the relationship tuple. The documentation has
been updated to describe the expected format.