FacetFilter
class FacetFilter<T, V>(val field: FieldOperations<V>, name: String? = null, val mode: FilterMode = FilterMode.UNION, val termsAgg: TermsAgg<T>) : Filter<FacetFilterResult<T>>
FacetFilter calculates counts for a field values and allows a search query to be filtered by those values.
Parameters
field
field where values are stored
name
optional filter name. If omitted, name of a property will be used
mode
mode to use when combining selected values. See FilterMode
termsAgg
terms aggregation for the FacetFilter. Can be used to change aggregation arguments: TermsAgg.size, TermsAgg.minDocCount and others
Constructors
Link copied to clipboard
fun <T, V> FacetFilter(field: FieldOperations<V>, name: String? = null, mode: FilterMode = FilterMode.UNION, termsAgg: TermsAgg<T>)
Types
Functions
Link copied to clipboard
open override fun prepare(name: String, paramName: String, params: QueryFilterParams): PreparedFacetFilter<T>
Parses params and prepares the FacetFilter for applying.
Link copied to clipboard
operator fun provideDelegate(thisRef: QueryFilters, property: KProperty<*>): ReadOnlyProperty<QueryFilters, BoundFilter<FacetFilterResult<T>>>