Module

Database.ElasticSearch.Query

Package
purescript-elasticsearch
Repository
ConnorDillon/purescript-elasticsearch

#Query Source

newtype Query

Constructors

#Match Source

type Match = { analyzer :: Optional String, auto_generate_synonyms_phrase_query :: Optional Boolean, boost :: Optional Number, 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 Source

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

#Range Source

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 Source

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 Source

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

#DisMax Source

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

#Prefix Source

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

#Operator Source

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

#ZeroTermsQuery Source

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

#Relation Source

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

#range Source

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

#matches Source

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

#terms Source

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

#prefixes Source

prefixes :: forall a. Homogeneous a Prefix => Record a -> Query

#bool Source

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

#boosting Source

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

#disMax Source

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