boolean (String text, String option, boolean force, final SearchableConfigurable configurable) { if (text == null || option == null || option.length() == 0) { return false; } final SearchableOptionsRegistrar searchableOptionsRegistrar = SearchableOptionsRegistrar.getInstance(); final Set<String> words = searchableOptionsRegistrar.getProcessedWords(option); final Set<String> options = configurable != null ? searchableOptionsRegistrar.replaceSynonyms(words, configurable) : words; if (options.isEmpty()) { return Strings.toLowerCase(text).contains(Strings.toLowerCase(option)); } final Set<String> tokens = searchableOptionsRegistrar.getProcessedWords(text); if (!force) { options.retainAll(tokens); final boolean highlight = !options.isEmpty(); return highlight || Strings.toLowerCase(text).contains(Strings.toLowerCase(option)); } else { options.removeAll(tokens); return options.isEmpty(); } }