FacetFilter

class FacetFilter<T, V>(field: <ERROR CLASS><V>, name: String?, mode: FacetFilterMode, termsAgg: <ERROR CLASS><T>) : Filter<PreparedFacetFilter<T>, 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
termsAgg
  • terms aggregation for the FacetFilter. Can be used to change aggregation arguments: TermsAgg.size, TermsAgg.minDocCount and others

Constructors

FacetFilter
Link copied to clipboard
fun <T, V> FacetFilter(field: <ERROR CLASS><V>, name: String? = null, mode: FacetFilterMode = FacetFilterMode.UNION, termsAgg: <ERROR CLASS><T>)
  • field where values are stored

Types

Companion
Link copied to clipboard
object Companion

Functions

prepare
Link copied to clipboard
open override fun prepare(name: String, params: QueryFilterParams): PreparedFacetFilter<T>
Parses params and prepares the FacetFilter for applying.
provideDelegate
Link copied to clipboard
operator fun provideDelegate(thisRef: QueryFilters, property: KProperty<*>): <ERROR CLASS><QueryFilters, BoundFilter<C, R>>

Properties

field
Link copied to clipboard
val field: <ERROR CLASS><V>
  • field where values are stored

mode
Link copied to clipboard
val mode: FacetFilterMode
termsAgg
Link copied to clipboard
val termsAgg: <ERROR CLASS><T>
  • terms aggregation for the FacetFilter. Can be used to change aggregation arguments: TermsAgg.size, TermsAgg.minDocCount and others