Module

Database.ElasticSearch.Query

#Query

newtype Query

Constructors

#Match

type Match = { analyzer :: Optional String, auto_generate_synonyms_phrase_query :: Optional Boolean, fuzziness :: Optional String, fuzzy_rewrite :: Optional String, fuzzy_transpositions :: Optional Boolean, lenient :: Optional Boolean, max_expansions :: Optional Int, minimum_should_match :: Optional String, operator :: Optional Operator, prefix_length :: Optional Int, query :: String |+| Number |+| Boolean, zero_terms_query :: Optional ZeroTermsQuery }

#Term

type Term = { boost :: Optional Number, case_insensitive :: Optional Boolean, value :: String }

#Range

type Range = { boost :: Optional Number, format :: Optional String, gt :: Optional (String |+| Number), gte :: Optional (String |+| Number), lt :: Optional (String |+| Number), lte :: Optional (String |+| Number), relation :: Optional Relation, time_zone :: Optional String }

#Bool

type Bool = { boost :: Optional Number, filter :: Optional (Array Query), minimum_should_match :: Optional Int, must :: Optional (Array Query), must_not :: Optional (Array Query), should :: Optional (Array Query) }

#Boosting

type Boosting = { negative :: Query, negative_boost :: Number, positive :: Query }

#DisMax

type DisMax = { queries :: Array Query, tie_breaker :: Optional Number }

#Operator

type Operator = (StringLit "AND") |+| (StringLit "OR")

#ZeroTermsQuery

type ZeroTermsQuery = (StringLit "all") |+| (StringLit "none")

#Relation

type Relation = (StringLit "INTERSECTS") |+| (StringLit "CONTAINS") |+| (StringLit "WITHIN")

#range

range :: forall a. Castable a Range => a -> Query

#matches

matches :: forall a. Homogeneous a Match => Record a -> Query

#match

#terms

terms :: forall a. Homogeneous a Term => Record a -> Query

#term

#bool

bool :: forall a. Castable a Bool => a -> Query

#boosting

boosting :: forall a. Castable a Boosting => a -> Query

#disMax

disMax :: forall a. Castable a DisMax => a -> Query

#and

#intersects

#contains

#within

Modules