[package]
name = "elastic_lens"
version = "0.10.0"
edition = "2021"
authors = ["Ben Falk <benjamin.falk@yahoo.com>"]
description = "An opinionated framework to work with Elasticsearch."
license-file = "LICENSE.md"
repository = "https://github.com/benfalk/elastic_lens"
categories = ["database"]
keywords = ["elasticsearch"]
readme = "README.md"

# See more keys and their definitions at:
#   https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }
thiserror = { version = "2.0" }
async-trait = { version = "0.1" }
arraystring = { version = "0.3.0" }
elastic_lens_offical_es7 = { version = "7", optional = true }
elastic_lens_offical_es8 = { version = "8", optional = true }

[features]
official_client = []
es_7 = []
es_8 = []
official_es7 = ["elastic_lens_offical_es7", "official_client", "es_7"]
official_es8 = ["elastic_lens_offical_es8", "official_client", "es_8"]

[dev-dependencies]
tokio = { version = "1", features = ["full"] }

[[example]]
name = "fetch_a_document"
path = "examples/fetch_a_document.rs"

[[example]]
name = "simple_search"
path = "examples/simple_search.rs"

[[example]]
name = "simple_aggs"
path = "examples/simple_aggs.rs"

[[example]]
name = "filter_aggs"
path = "examples/filter_aggs.rs"

[[example]]
name = "multi_search"
path = "examples/multi_search.rs"

[[example]]
name = "simple_sort"
path = "examples/simple_sort.rs"

[[example]]
name = "script_score"
path = "examples/script_score.rs"

[[example]]
name = "script_sort"
path = "examples/script_sort.rs"

[[example]]
name = "nested_filter"
path = "examples/nested_filter.rs"

[[example]]
name = "scroll_search"
path = "examples/scroll_search.rs"

[[example]]
name = "collapse_by"
path = "examples/collapse_by.rs"

[[example]]
name = "cardinality_agg"
path = "examples/cardinality_agg.rs"

[[example]]
name = "script_filter"
path = "examples/script_filter.rs"

# To avoid repeating the same model over and
# over between examples this serves as a shared
# lib for them
[[example]]
name = "inventory_item"
path = "examples/inventory_item.rs"
crate-type = ["lib"]

[[example]]
name = "sample_code"
path = "examples/sample_code.rs"
crate-type = ["lib"]
