### Question:
KeywordQueryParser extends StandardQueryParser { public void setAllowTwig(final boolean allowTwig) { this.getQueryConfigHandler().set(KeywordConfigurationKeys.ALLOW_TWIG, allowTwig); } KeywordQueryParser(); @Override void setDefaultOperator(final Operator operator); void setQNames(final Properties qnames); void setAllowFuzzyAndWildcard(final boolean allowFuzzyWildcard); void setDatatypeAnalyzers(final Map<String, Analyzer> dtAnalyzers); @Override void setAnalyzer(final Analyzer analyzer); void setRootLevel(final int level); void setAllowTwig(final boolean allowTwig); @Override String toString();  }### Answer:
@Test public void testQueryType() throws Exception { final KeywordQueryParser parser = new KeywordQueryParser(); parser.setAllowTwig(false); Query query = parser.parse("aaa AND bbb", "a"); assertTrue(query instanceof NodeBooleanQuery); query = parser.parse("hello", "a"); assertTrue(query instanceof NodeTermQuery); query = parser.parse("\"hello Future\"", "a"); assertTrue(query instanceof NodePhraseQuery); }