Package-level declarations

Types

Link copied to clipboard
class AppliedQueryFilters(queryFilters: OrderedMap<String, BoundFilter<*>>, preparedFilters: Map<String, PreparedFilter<*>>)
Link copied to clipboard
data class AttrBoolFacet(val attrId: Int, val values: List<AttrBoolFacetValue>) : Iterable<AttrBoolFacetValue>
Link copied to clipboard

Facet fiter for attribute values. An attribute value is a pair of 2 32-bit values attribute id and value id combined as a single 64-bit field.

Link copied to clipboard
data class AttrBoolFacetFilterResult(val name: String, val paramName: String, val facets: Map<Int, AttrBoolFacet>) : FilterResult, Iterable<Map.Entry<Int, AttrBoolFacet>>
Link copied to clipboard
data class AttrBoolFacetValue(val value: Boolean, val count: Long)
Link copied to clipboard
Link copied to clipboard
data class AttrFacet(val attrId: Int, val values: List<AttrFacetValue>) : Iterable<AttrFacetValue>
Link copied to clipboard

Facet fiter for attribute values. An attribute value is a pair of 2 32-bit values attribute id and value id combined as a single 64-bit field.

Link copied to clipboard
data class AttrFacetFilterResult(val name: String, val paramName: String, val facets: Map<Int, AttrFacet>) : FilterResult, Iterable<Map.Entry<Int, AttrFacet>>
Link copied to clipboard
data class AttrFacetValue(val value: Int, val count: Long, val selected: Boolean)
Link copied to clipboard
data class AttrRangeFacet(val attrId: Int, val count: Long, val min: Float?, val max: Float?)
Link copied to clipboard
Link copied to clipboard
data class AttrRangeFacetFilterResult(val name: String, val paramName: String, val facets: Map<Int, AttrRangeFacet>) : FilterResult
Link copied to clipboard
Link copied to clipboard
class AttrSimpleFilter(val field: FieldOperations<Long>, name: String? = null) : Filter<BaseFilterResult>
Link copied to clipboard
open class BaseFilterResult(val name: String, val paramName: String) : FilterResult

Filter that is ready for applying to a search query.

Link copied to clipboard
class BoundFilter<R : FilterResult>(val name: String, val paramName: String, val filter: Filter<R>)
Link copied to clipboard
class ExpressionValue(val name: String, val expr: QueryExpression)
Link copied to clipboard
class FacetExpressionFilterResult(val name: String, val paramName: String, val results: List<FacetExpressionValue>, val mode: FilterMode) : FilterResult
Link copied to clipboard
open class FacetExpressionsFilter(name: String? = null, allValues: List<ExpressionValue> = emptyList(), val mode: FilterMode = FilterMode.UNION) : Filter<FacetExpressionFilterResult>
Link copied to clipboard
data class FacetExpressionValue(val name: String, val selected: Boolean, val docCount: Long)
Link copied to clipboard
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.

Link copied to clipboard
data class FacetFilterResult<T>(val name: String, val paramName: String, val mode: FilterMode, val values: List<FacetFilterValue<T>>, val selected: Boolean) : FilterResult, Iterable<FacetFilterValue<T>>

FacetFilterResult represents result of a FacetFilter.

Link copied to clipboard
data class FacetFilterValue<T>(val bucket: TermBucket<T>, val selected: Boolean) : AggAwareResult

FacetFilterValue represents bucket of the corresponding terms aggregation.

Link copied to clipboard
class FacetRangeFilter<T>(val field: FieldOperations<T>, name: String? = null, val aggs: Map<String, Aggregation<*>> = emptyMap()) : Filter<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.

Link copied to clipboard
data class FacetRangeFilterResult<T>(val name: String, val paramName: String, val from: T?, val to: T?, val count: Long, val aggs: Map<String, AggregationResult>) : AggAwareResult, FilterResult
Link copied to clipboard
abstract class Filter<R : FilterResult>(val name: String?)
Link copied to clipboard

FilterMode determines a way how values should be filtered.

Link copied to clipboard
interface FilterResult
Link copied to clipboard
sealed class MatchKey
Link copied to clipboard
class PageFilter(name: String? = null, val availablePageSizes: List<Int> = DEFAULT_AVAILABLE_PAGE_SIZES, defaultPageSize: Int? = null, val maxHits: Int = DEFAULT_MAX_HITS) : Filter<PageFilterResult>

PageFilter allows to paginate search query results.

Link copied to clipboard
data class PageFilterResult(val name: String, val paramName: String, val hits: List<SearchHit<*>>, val totalHits: Long, val page: Int, val perPage: Int, val totalPages: Int, val from: Int, val size: Int) : FilterResult, Iterable<SearchHit<*>>

PageFilterResult holds result of a PageFilter.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class PreparedAttrExpressionFilter(val filter: AttrSimpleFilter, name: String, paramName: String, filterExpression: QueryExpression?) : PreparedFilter<BaseFilterResult>
Link copied to clipboard
class PreparedAttrFacetFilter(val filter: AttrFacetFilter, name: String, paramName: String, facetFilterExpr: QueryExpression?, val selectedValues: Map<Int, AttrFacetFilter.SelectedValues>) : PreparedFilter<AttrFacetFilterResult>
Link copied to clipboard
class PreparedFacetExpressionFilter(name: String, paramName: String, selectedFilterExprs: List<ExpressionValue>, facetFilterExprs: List<ExpressionValue>, val mode: FilterMode) : PreparedFilter<FacetExpressionFilterResult>
Link copied to clipboard
class PreparedFacetFilter<T>(val filter: FacetFilter<T, *>, name: String, paramName: String, facetFilterExpr: QueryExpression?, val selectedValues: List<Any>) : PreparedFilter<FacetFilterResult<T>>

Filter that is ready for applying to a search query.

Link copied to clipboard
class PreparedFacetRangeFilter<T>(val filter: FacetRangeFilter<T>, name: String, paramName: String, facetFilterExpr: QueryExpression?, val from: Any?, val to: Any?) : PreparedFilter<FacetRangeFilterResult<T>>

Filter that is ready for applying to a search query.

Link copied to clipboard
abstract class PreparedFilter<T : FilterResult>(val name: String, val paramName: String, val facetFilterExpr: QueryExpression?)
Link copied to clipboard
class PreparedPageFilter(val filter: PageFilter, name: String, paramName: String, val page: Int, val perPage: Int, val from: Int, val size: Int) : PreparedFilter<PageFilterResult>

Filter that is ready for applying to a search query.

Link copied to clipboard
class PreparedSimpleFilter(name: String, paramName: String, filterExpression: QueryExpression?) : PreparedFilter<BaseFilterResult>
Link copied to clipboard
class PreparedSortFilter(val filter: SortFilter, name: String, paramName: String, val selectedValue: SortFilterValue) : PreparedFilter<SortFilterResult>

Filter that is ready for applying to a search query.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class SimpleExpressionsFilter(name: String? = null, val values: List<ExpressionValue> = emptyList(), mode: FilterMode = FilterMode.UNION) : Filter<BaseFilterResult>
Link copied to clipboard
open class SimpleFilter<T>(val field: FieldOperations<T>, name: String? = null, val mode: FilterMode = FilterMode.UNION) : Filter<BaseFilterResult>
Link copied to clipboard
class SortFilter(sortValues: SortFilterValue, name: String? = null) : Filter<SortFilterResult>

SortFilter applies a sorting to a search query.

Link copied to clipboard
data class SortFilterResult(val name: String, val paramName: String, val values: List<SortFilterValueResult>) : FilterResult, Iterable<SortFilterValueResult>

Result of the SortFilter.

Link copied to clipboard
class SortFilterValue(val value: String, val sorts: List<Sort>)

SortFilterValue holds a value of a sort and a list of Sort that should be applied when the value is selected.

Link copied to clipboard
data class SortFilterValueResult(val value: String, val selected: Boolean)

Represents result of the SortFilterValue.

Functions

Link copied to clipboard
fun decodeAttrAndValue(attrValue: Long): Pair<Int, Int>
Link copied to clipboard
Link copied to clipboard
fun <T> QueryFilterParams.decodeLastValue(key: String, fieldType: FieldType<*, T>): T?
fun <T> QueryFilterParams.decodeLastValue(key: List<String>, fieldType: FieldType<*, T>): T?
Link copied to clipboard
fun <T> QueryFilterParams.decodeValues(key: String, fieldType: FieldType<*, T>): List<T & Any>
fun <T> QueryFilterParams.decodeValues(key: List<String>, fieldType: FieldType<*, T>): List<T & Any>
Link copied to clipboard
fun <T> FieldType<*, T>.deserializeTermOrNull(term: Any): T?
Link copied to clipboard
fun encodeAttrWithValue(attrId: Int, valueId: Int): Long
Link copied to clipboard
fun encodeBoolAttrWithValue(attrId: Int, value: Boolean): Long
Link copied to clipboard
fun encodeRangeAttrWithValue(attrId: Int, value: Float): Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard