private void remove(List<PhraseMatcher.Phrase> phrases) {
        // Removing the leaf replace phrases first to preserve
        // the start index of each replace phrase until removing
        for (int i = phrases.size()-1; i >= 0; i-- ) {
            PhraseMatcher.Phrase phrase = phrases.get(i);
            if (phrase.getLength() < phrase.getOwner().getItemCount()) // Don't removeField all
                phrase.remove();
        }
    }
Creates a nonphrasing searcher

@param  phraseAutomatonFile the file containing phrases which should be removed
@throws IllegalStateException if the automata component is unavailable
        in the current environment
@throws IllegalArgumentException if the file is not found
container-search/src/main/java/com/yahoo/prelude/querytransform/NonPhrasingSearcher.java