public override Weight CreateWeight(Searcher searcher)
{
if (terms.Count == 1)
{
// optimize one-term case
Term term = terms[0];
Query termQuery = new TermQuery(term);
termQuery.Boost = Boost;
return termQuery.CreateWeight(searcher);
}
return new PhraseWeight(this, searcher);
}