### Question:
LuceneTermQueryBuilder implements TermQueryBuilder { @Override public TermQuery createTermQuery(final Term term, final FieldBoost boost) { return new TermQuery(term); }  @Override Optional<DocumentFrequencyCorrection> getDocumentFrequencyCorrection(); @Override TermQuery createTermQuery(final Term term, final FieldBoost boost);  }### Answer:
@Test public void testThatQueryUsesTermButNoFieldBoost() throws Exception { Analyzer analyzer = new StandardAnalyzer(); Directory directory = new ByteBuffersDirectory(); IndexWriterConfig config = new IndexWriterConfig(analyzer); config.setSimilarity(new ClassicSimilarity()); IndexWriter indexWriter = new IndexWriter(directory, config); TestUtil.addNumDocsWithTextField("f1", "v1 v1", indexWriter, 4); TestUtil.addNumDocsWithTextField("f1", "v2", indexWriter, 1); indexWriter.close(); IndexReader indexReader = DirectoryReader.open(directory); IndexSearcher indexSearcher = new IndexSearcher(indexReader); indexSearcher.setSimilarity(new ClassicSimilarity()); final TermQuery termQuery = new LuceneTermQueryBuilder() .createTermQuery(new Term("f1", "v1"), new ConstantFieldBoost(3f)); final Term term = termQuery.getTerm(); assertEquals("f1", term.field()); assertEquals("v1", term.text()); TopDocs topDocs = indexSearcher.search(termQuery, 10); final Weight weight = termQuery.createWeight(indexSearcher, ScoreMode.COMPLETE, 4.5f); final Explanation explain = weight.explain(indexReader.getContext().leaves().get(0), topDocs.scoreDocs[0].doc); String explainText = explain.toString(); assertTrue(explainText.contains("4.5 = boost")); assertTrue(explainText.contains("4 = docFreq")); assertTrue(explainText.contains("2.0 = freq")); }