Search in sources :

Example 21 with CommonQueryParserConfiguration

use of org.apache.lucene.queryparser.flexible.standard.CommonQueryParserConfiguration in project lucene-solr by apache.

the class QueryParserTestBase method getQueryDOA.

public Query getQueryDOA(String query, Analyzer a) throws Exception {
    if (a == null)
        a = new MockAnalyzer(random(), MockTokenizer.SIMPLE, true);
    CommonQueryParserConfiguration qp = getParserConfig(a);
    setDefaultOperatorAND(qp);
    return getQuery(query, qp);
}
Also used : CommonQueryParserConfiguration(org.apache.lucene.queryparser.flexible.standard.CommonQueryParserConfiguration)

Aggregations

CommonQueryParserConfiguration (org.apache.lucene.queryparser.flexible.standard.CommonQueryParserConfiguration)21 Term (org.apache.lucene.index.Term)4 CharacterRunAutomaton (org.apache.lucene.util.automaton.CharacterRunAutomaton)3 RegExp (org.apache.lucene.util.automaton.RegExp)2 Calendar (java.util.Calendar)1 GregorianCalendar (java.util.GregorianCalendar)1 QueryParser (org.apache.lucene.queryparser.classic.QueryParser)1 TestQueryParser (org.apache.lucene.queryparser.classic.TestQueryParser)1