// Iterate through each substring element.
for (ByteString element : elements)
{
// Normalize the substring according to the substring matching rule.
ByteString normValue = matchRule.normalizeSubstring(element);
byte[] normBytes = normValue.toByteArray();
// Get the candidate entry IDs from the index.
EntryIDSet list = matchSubstring(normBytes);