I want to boost a query in Lucene 7. In the previous versions (< 6) I was just using the setBoost(float boost) method. i.e.
TermQuery termQuery = new TermQuery(new Term("field", "value"));
termQuery.setBoost(2);
In Lucene 7 there is only a method that contains the boost as a parameter:
public Weight createWeight(IndexSearcher searcher,
boolean needsScores,
float boost)
which isn't the method responsible for the boost! Do you know how to apply the boosting to the queries?