@Test public void testBuildQueryParser() { String defaultField = "fooBar"; StandardAnalyzer analyzer = new StandardAnalyzer(); QueryParserBuilder sut = new QueryParserBuilder(defaultField, analyzer, "OR"); QueryParser parser = sut.buildQueryParser(); assertEquals(defaultField, parser.getField()); assertSame(analyzer, parser.getAnalyzer()); assertNotSame(sut.buildQueryParser(), sut.buildQueryParser()); assertSame(sut.buildQueryParser().getAnalyzer(), sut.buildQueryParser().getAnalyzer()); }
public QueryParser buildQueryParser() { QueryParser qp = new QueryParser(defaultField, analyzer); log.info("Setting default boolean operator to " + defaultBooleanOperator.toString()); qp.setDefaultOperator(defaultBooleanOperator); return qp; }
QueryParserBuilder { public QueryParser buildQueryParser() { QueryParser qp = new QueryParser(defaultField, analyzer); log.info("Setting default boolean operator to " + defaultBooleanOperator.toString()); qp.setDefaultOperator(defaultBooleanOperator); return qp; } }
QueryParserBuilder { public QueryParser buildQueryParser() { QueryParser qp = new QueryParser(defaultField, analyzer); log.info("Setting default boolean operator to " + defaultBooleanOperator.toString()); qp.setDefaultOperator(defaultBooleanOperator); return qp; } QueryParserBuilder(final String inDefaultField, final Analyzer inAnalyzer,
            final String inDefaultBooleanOperator); }
QueryParserBuilder { public QueryParser buildQueryParser() { QueryParser qp = new QueryParser(defaultField, analyzer); log.info("Setting default boolean operator to " + defaultBooleanOperator.toString()); qp.setDefaultOperator(defaultBooleanOperator); return qp; } QueryParserBuilder(final String inDefaultField, final Analyzer inAnalyzer,
            final String inDefaultBooleanOperator); QueryParser buildQueryParser(); }
QueryParserBuilder { public QueryParser buildQueryParser() { QueryParser qp = new QueryParser(defaultField, analyzer); log.info("Setting default boolean operator to " + defaultBooleanOperator.toString()); qp.setDefaultOperator(defaultBooleanOperator); return qp; } QueryParserBuilder(final String inDefaultField, final Analyzer inAnalyzer,
            final String inDefaultBooleanOperator); QueryParser buildQueryParser();  }