Module

Database.ElasticSearch

Re-exports from Database.ElasticSearch.Bulk

#Error

type Error = { index :: String, index_uuid :: String, reason :: String, type :: String }

#BulkUpdateParams

type BulkUpdateParams = { _id :: String, _index :: Optional String, require_alias :: Optional Boolean }

#BulkResult

type BulkResult = (errors :: Boolean, items :: Array ActionResult, took :: Int)

#BulkParams

type BulkParams = (_source :: Optional (Array String), _sourceExcludes :: Optional (Array String), _sourceIncludes :: Optional (Array String), body :: BulkBody, index :: String, pipeline :: Optional String, refresh :: Optional Refresh, requireAlias :: Optional Boolean, routing :: Optional String, timeout :: Optional String, waitForActiveShards :: Optional String)

#BulkIndexParams

type BulkIndexParams = { _id :: Optional String, _index :: Optional String, dynamic_templates :: Optional (Object Json), require_alias :: Optional Boolean }

#BulkDeleteParams

type BulkDeleteParams = { _id :: String, _index :: Optional String, require_alias :: Optional Boolean }

#BulkCreateParams

#BulkBody

#ActionResult

type ActionResult = { _id :: String, _index :: String, _primary_term :: Int, _seq_no :: Int, _shards :: { failed :: Int, successful :: Int, total :: Int }, _type :: String, _version :: Int, error :: Optional Error, result :: String, status :: Int }

#Action

type Action = { create :: BulkCreateParams } |+| { delete :: BulkDeleteParams } |+| { index :: BulkIndexParams } |+| { update :: BulkUpdateParams } |+| { doc :: Object Json } |+| (Object Json)

#bulkUpdate

bulkUpdate :: forall a b. Castable a BulkUpdateParams => EncodeJson (Record b) => a -> Record b -> BulkBody

#bulkIndex

bulkIndex :: forall a b. Castable a BulkIndexParams => EncodeJson (Record b) => a -> Record b -> BulkBody

#bulkDelete

#bulkCreate

bulkCreate :: forall a b. Castable a BulkCreateParams => EncodeJson (Record b) => a -> Record b -> BulkBody

Re-exports from Database.ElasticSearch.Client

#Client

data Client :: Type

#Auth

type Auth = { password :: String, username :: String } |+| { apiKey :: ApiKey }

#ApiKey

type ApiKey = String |+| { api_key :: String, id :: String }

#cloudClient

cloudClient :: { auth :: Auth, cloud :: { id :: String } } -> Effect Client

#client

client :: forall a. Castable (Record a) { auth :: UndefinedOr Auth, node :: String } => Record a -> Effect Client

#apiKey

apiKey :: forall a. Castable a ApiKey => a -> Auth

Re-exports from Database.ElasticSearch.Common

#Response

type Response a = { body :: Record a, headers :: Object Json, meta :: Object Json, statusCode :: Int, warnings :: Optional (Array String) }

#RequestParams

type RequestParams = { ignore :: Optional (Array Number), maxRetries :: Optional Number }

#Optional

#DataType

type DataType = (StringLit "boolean") |+| (StringLit "date") |+| (StringLit "double") |+| (StringLit "geo_point") |+| (StringLit "ip") |+| (StringLit "keyword") |+| (StringLit "long")

#CommonParams

type CommonParams a = { error_trace :: Optional Boolean, filter_path :: Optional (Array Json), human :: Optional Boolean, pretty :: Optional Boolean, source :: Optional String | a }

#Api

type Api a b = forall c d. Castable (Record c) (CommonParams a) => Castable (Record d) RequestParams => Client -> Record c -> Record d -> Aff (Response b)

#toObject

toObject :: forall a. EncodeJson (Record a) => Record a -> Object Json

#long

#keyword

#geo_point

#double

#date

#boolean

Re-exports from Database.ElasticSearch.Create

#CreateParams

type CreateParams = (body :: Object Json, id :: Optional String, index :: String, pipeline :: Optional String, refresh :: Optional Refresh, routing :: Optional String, timeout :: Optional String, version :: Optional Number, versionType :: Optional VersionType, waitForActiveShards :: Optional String)

Re-exports from Database.ElasticSearch.Delete

#DeleteParams

type DeleteParams = (id :: String, ifPrimaryTerm :: Optional Number, ifSeqNo :: Optional Number, index :: String, refresh :: Optional Refresh, routing :: Optional String, timeout :: Optional String, version :: Optional Number, versionType :: Optional VersionType, waitForActiveShards :: Optional String)

Re-exports from Database.ElasticSearch.Get

#GetResult

type GetResult = (_fields :: Optional (Object Json), _id :: String, _index :: String, _primary_term :: Int, _routing :: Optional String, _seq_no :: Int, _source :: Optional (Object Json), _type :: String, _version :: Int, found :: Boolean)

#GetParams

type GetParams = (_source :: Optional (Array String), _source_excludes :: Optional (Array String), _source_includes :: Optional (Array String), id :: String, index :: String, preference :: Optional String, realtime :: Optional Boolean, refresh :: Optional Boolean, routing :: Optional String, stored_fields :: Optional (Array String), version :: Optional Number, version_type :: Optional VersionType)

Re-exports from Database.ElasticSearch.Index

#VersionType

type VersionType = (StringLit "internal") |+| (StringLit "external") |+| (StringLit "external_gte")

#Refresh

type Refresh = (StringLit "true") |+| (StringLit "false") |+| (StringLit "wait_for")

#OpType

type OpType = (StringLit "index") |+| (StringLit "create")

#IndexResult

type IndexResult = (_id :: String, _index :: String, _primary_term :: Int, _seq_no :: Int, _shards :: { failed :: Int, successful :: Int, total :: Int }, _type :: String, _version :: Int, result :: String)

#IndexParams

type IndexParams = (body :: Object Json, id :: Optional String, ifPrimaryTerm :: Optional Number, ifSeqNo :: Optional Number, index :: String, opType :: Optional OpType, pipeline :: Optional String, refresh :: Optional Refresh, requireAlias :: Optional Boolean, routing :: Optional String, timeout :: Optional String, type :: Optional String, version :: Optional Number, versionType :: Optional VersionType, waitForActiveShards :: Optional String)

#waitFor

#refreshTrue

#refreshFalse

#indexOp

#externalGte

#createOp

Re-exports from Database.ElasticSearch.Indices.Create

#Settings

type Settings = { number_of_replicas :: Optional Int, number_of_shards :: Optional Int }

#Mapping

type Mapping = { index :: Optional Boolean, type :: DataType }

#CreateIndexParams

type CreateIndexParams = (body :: Optional CreateIndexBody, include_type_name :: Optional Boolean, index :: String, master_timeout :: Optional String, timeout :: Optional String, wait_for_active_shards :: Optional String)

#CreateIndexBody

type CreateIndexBody = { aliases :: Optional (Object Alias), mappings :: Optional { properties :: Object Mapping }, settings :: Optional Settings }

#Alias

type Alias = { index_routing :: Optional String, is_hidden :: Optional Boolean, is_write_index :: Optional Boolean, routing :: Optional String, search_routing :: Optional String }

#settings

#mappings

mappings :: forall a. Homogeneous a Mapping => Record a -> { properties :: Object Mapping }

#mapping

#createIndex

#aliases

aliases :: forall a. Homogeneous a Alias => Record a -> Object Alias

#alias

Re-exports from Database.ElasticSearch.Indices.Delete

#DeleteIndexParams

type DeleteIndexParams = (allow_no_indices :: Optional Boolean, expand_wildcards :: Optional ExpandWildcards, ignore_unavailable :: Optional Boolean, index :: Array String, master_timeout :: Optional String, timeout :: Optional String)

#deleteIndex

Re-exports from Database.ElasticSearch.Query

#ZeroTermsQuery

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

#Term

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

#Relation

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

#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 }

#Query

newtype Query

Constructors

#Operator

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

#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 }

#DisMax

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

#Boosting

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

#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) }

#within

#terms

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

#term

#range

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

#matches

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

#match

#intersects

#disMax

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

#contains

#boosting

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

#bool

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

#and

Re-exports from Database.ElasticSearch.Search

#SuggestMode

type SuggestMode = (StringLit "missing") |+| (StringLit "popular") |+| (StringLit "always")

#SearchType

type SearchType = (StringLit "query_then_fetch") |+| (StringLit "dfs_query_then_fetch")

#SearchSource

type SearchSource = Boolean |+| (Array String) |+| { excludes :: Array String, includes :: Array String }

#SearchResult

type SearchResult = (_scroll_id :: Optional String, _shards :: { failed :: Int, skipped :: Int, successful :: Int, total :: Int }, hits :: { hits :: Array { _id :: String, _index :: String, _score :: Int, _source :: Optional (Object Json), _type :: String, fields :: Optional (Object Json) }, max_score :: Optional Number, total :: { relation :: String, value :: Int } }, timed_out :: Boolean, took :: Int)

#SearchParamsOpt

type SearchParamsOpt = (_source :: Optional (Array String), _source_excludes :: Optional (Array String), _source_includes :: Optional (Array String), allow_no_indices :: Optional Boolean, allow_partial_search_results :: Optional Boolean, analyze_wildcard :: Optional Boolean, analyzer :: Optional String, batched_reduce_size :: Optional Number, body :: Optional SearchBody, ccs_minimize_roundtrips :: Optional Boolean, default_operator :: Optional Operator, df :: Optional String, docvalue_fields :: Optional (Array String), expand_wildcards :: Optional ExpandWildcards, explain :: Optional Boolean, from :: Optional Number, ignore_throttled :: Optional Boolean, ignore_unavailable :: Optional Boolean, index :: Optional (Array String), lenient :: Optional Boolean, max_concurrent_shard_requests :: Optional Number, min_compatible_shard_node :: Optional String, pre_filter_shard_size :: Optional Number, preference :: Optional String, q :: Optional String, request_cache :: Optional Boolean, rest_total_hits_as_int :: Optional Boolean, routing :: Optional (Array String), scroll :: Optional String, search_type :: Optional SearchType, seq_no_primary_term :: Optional Boolean, size :: Optional Number, sort :: Optional (Array String), stats :: Optional (Array String), stored_fields :: Optional (Array String), suggest_field :: Optional String, suggest_mode :: Optional SuggestMode, suggest_size :: Optional Number, suggest_text :: Optional String, terminate_after :: Optional Number, timeout :: Optional String, track_scores :: Optional Boolean, track_total_hits :: Optional Boolean, type :: Optional (Array String), typed_keys :: Optional Boolean, version :: Optional Boolean)

#SearchBody

type SearchBody = { _source :: Optional SearchSource, docvalue_fields :: Optional Fields, explain :: Optional Boolean, fields :: Optional Fields, from :: Optional Int, indices_boost :: Optional (Array (Object Number)), min_score :: Optional Number, pit :: Optional Pit, query :: Optional Query, runtime_mappings :: Optional (Object RuntimeMapping), seq_no_primary_term :: Optional Boolean, size :: Optional Int, stats :: Optional (Array String), terminate_after :: Optional Int, timeout :: Optional String, version :: Optional Boolean }

#RuntimeMapping

type RuntimeMapping = { script :: UndefinedOr String, type :: DataType }

#Pit

type Pit = { id :: String, keep_alive :: Optional String }

#Fields

type Fields = Array (String |+| { field :: String, format :: UndefinedOr String })

#ExpandWildcards

type ExpandWildcards = (StringLit "open") |+| (StringLit "closed") |+| (StringLit "hidden") |+| (StringLit "none") |+| (StringLit "all")

#queryThenFetch

#pit

#dfsQueryThenFetch

Re-exports from Database.ElasticSearch.Update

#UpdateParams

type UpdateParams = (_source :: Optional (Array String), _sourceExcludes :: Optional (Array String), _sourceIncludes :: Optional (Array String), body :: UpdateBody, id :: String, ifPrimaryTerm :: Optional Number, ifSeqNo :: Optional Number, index :: String, lang :: Optional String, refresh :: Optional Refresh, requireAlias :: Optional Boolean, retryOnConflict :: Optional Number, routing :: Optional String, timeout :: Optional String, waitForActiveShards :: Optional String)

#UpdateBody

type UpdateBody = { doc :: Object Json } |+| { script :: Script }

#Script

type Script = String |+| { lang :: String, params :: Object Json, source :: String }

#script

script :: forall a. Castable a Script => a -> UpdateBody

#doc

doc :: forall a. EncodeJson (Record a) => Record a -> UpdateBody

Modules