FacetRangeFilter

class FacetRangeFilter<T>(field: <ERROR CLASS><T>, name: String?, aggs: Map<String, <ERROR CLASS><out <ERROR CLASS>>>) : Filter<PreparedFacetRangeFilter<T>, FacetRangeFilterResult<T>>

FacetRangeFilter filters a search query using a dev.evo.elasticmagic.query.Range query. Also calculates number of documents that have value in the FacetRangeFilter.field.

Parameters

field
  • field to filter a search query with

name
  • optional filter name. If omitted, name of a property will be used

aggs
  • mapping with aggregations. Can be used to calculate aggregation for a FacetRangeFilter.field. For example, minimum and maximum values or a histogram can be calculated.

Constructors

FacetRangeFilter
Link copied to clipboard
fun <T> FacetRangeFilter(field: <ERROR CLASS><T>, name: String? = null, aggs: Map<String, <ERROR CLASS><out <ERROR CLASS>>> = emptyMap())
  • field to filter a search query with

Functions

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

Properties

aggs
Link copied to clipboard
val aggs: Map<String, <ERROR CLASS><out <ERROR CLASS>>>
  • mapping with aggregations. Can be used to calculate aggregation for a FacetRangeFilter.field. For example, minimum and maximum values or a histogram can be calculated.

field
Link copied to clipboard
val field: <ERROR CLASS><T>
  • field to filter a search query with