class HerdSearchQueryHelper {

    public List<String> extractNegationTerms(final IndexSearchRequest indexSearchRequest)
    {
        final Matcher regexMatcher = getNegationTermMatcher(indexSearchRequest);

        final List<String> negationTerms = new ArrayList<>();

        while (regexMatcher.find())
        {
            // extract all matches and return only the words
            negationTerms.add(regexMatcher.group().replaceAll("-", "").trim());
        }

        return negationTerms;
    }

}