public static ParserEnvironment fromParserEnvironment(ParserEnvironment environment) {
        return new ParserEnvironment()
                .setIndexFacts(environment.indexFacts)
                .setParserSettings(environment.parserSettings)
                .setLinguistics(environment.linguistics)
                .setSpecialTokens(environment.specialTokens)
                .setType(environment.type);
    }
Flags to set various sub-modes in query parsing
container-search/src/main/java/com/yahoo/search/query/parser/ParserEnvironment.java