private Optional<DocumentFrequency> getDocumentFrequency(BlockItem blockItem) {
        if (blockItem instanceof TermItem termItem) return termItem.getDocumentFrequency();
        if (blockItem instanceof PhraseSegmentItem phraseSegmentItem) return phraseSegmentItem.getDocumentFrequency();
        return Optional.empty();
    }
Replaces query terms with their stems

@author Mathias Lidal
@author bratseth
@author Steinar Knutsen
container-search/src/main/java/com/yahoo/prelude/querytransform/StemmingSearcher.java