When we don't care about the impact of the retrieval term frequency TF (Term Frequency) on the ranking of search results, we can use constant_score to wrap the query statement query or filter statement, which improves the search speed.
Example: There are 100 people in our class, and there is a field called "name". We want to find people whose names contain "Wang", and we don't care about the sorting results. Using ConstScoreQuery (placing the original Query in "private Query filter;") will greatly improve the search speed.