'Search the index for matches starting with target_prefix.
Args:
index_urn: The index to use. Should be a urn that points to the sha256
namespace.
target_prefix: The prefix to match against the index.
limit: Either a tuple of (start, limit) or a maximum number of results to
return.
token: A DB token.
Yields:
URNs of files which have the same data as this file - as read from the
index.'

@classmethod
def Query(cls, index_urn, target_prefix='', limit=100, token=None):

    prefix = [('index:target:%s' % target_prefix.lower())]
    if isinstance(limit, (tuple, list)):
        (start, length) = limit
    else:
        start = 0
        length = limit
    for (i, (_, hit, _)) in enumerate(data_store.DB.ResolvePrefix(index_urn, prefix, token=token, limit=limit)):
        if (i < start):
            continue
        if (i >= (start + length)):
            break
        (yield rdfvalue.RDFURN(hit))
