createWeight

open fun createWeight(query: Query, scoreMode: ScoreMode, boost: Float): Weight

Creates a Weight for the given query, potentially adding caching if possible and configured.