public Optional<StringMatchLocation> match(final String string) {
        final List<StringMatchLocation> matches = match(string, 1);
        if (matches.isEmpty()) {
            return Optional.empty();
        }
        return Optional.of(matches.getFirst());
    }
Types that will need the case of pattern to be normalised if caseSensitive is true.
stroom-index/stroom-index-lucene980/src/main/java/stroom/contentindex/StringMatcher.java