Module

Database.ElasticSearch

Package
purescript-elasticsearch
Repository
ConnorDillon/purescript-elasticsearch

Re-exports from Database.ElasticSearch.Bulk

#Error Source

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

#BulkUpdateParams Source

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

#BulkResult Source

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

#BulkParams Source

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 Source

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

#BulkDeleteParams Source

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

#BulkBody Source

#ActionResult Source

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 Source

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

#bulkUpdate Source

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

#bulkIndex Source

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

#bulkDelete Source

#bulkCreate Source

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

Re-exports from Database.ElasticSearch.Client

#Client Source

data Client :: Type

#Auth Source

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

#ApiKey Source

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

#cloudClient Source

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

#client Source

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

#apiKey Source

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

Re-exports from Database.ElasticSearch.Common

#Response Source

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

#RequestParams Source

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

#Optional Source

#DataType Source

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

#CommonParams Source

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

#Api Source

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 Source

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

Re-exports from Database.ElasticSearch.Create

#CreateParams Source

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 Source

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 Source

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 Source

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 Source

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

#Refresh Source

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

#OpType Source

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

#IndexResult Source

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 Source

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)

Re-exports from Database.ElasticSearch.Indices.Create

#Settings Source

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

#Mapping Source

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

#CreateIndexParams Source

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 Source

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

#Alias Source

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

#mappings Source

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

#createIndex Source

#aliases Source

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

Re-exports from Database.ElasticSearch.Indices.Delete

#DeleteIndexParams Source

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 Source

Re-exports from Database.ElasticSearch.Query

#ZeroTermsQuery Source

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

#Term Source

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

#Relation Source

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

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

#Query Source

newtype Query

Constructors

#Operator Source

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

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

#DisMax Source

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

#Boosting Source

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

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

#terms Source

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

#range Source

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

#matches Source

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

#disMax Source

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

#boosting Source

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

#bool Source

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

Re-exports from Database.ElasticSearch.Search

#SuggestMode Source

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

#SearchType Source

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

#SearchSource Source

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

#SearchResult Source

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 Source

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 Source

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 Source

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

#Pit Source

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

#Fields Source

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

#ExpandWildcards Source

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

Re-exports from Database.ElasticSearch.Update

#UpdateParams Source

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 Source

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

#Script Source

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

#script Source

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

#doc Source

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