Neuroplastic::Query
Inherits Reference < Object
Constants
RANGE_PARAMS = {:gte, :gt, :lte, :lt, :boost}
Constructors
new(params : HTTP::Params | Hash(String, String | Array(String)) | Hash(Symbol, String | Array(String)) = {} of String => String)
Sourcenew(search : String, limit : Int32 = 100, offset : Int32 = 0)
SourceInstance methods
aggs
Sourceavg(name : String, field : String)
Sourcebuild
Sourcecardinality(name : String, field : String)
Sourcechild
Sourcedate_histogram(name : String, field : String, *, calendar_interval : String | Nil = nil, fixed_interval : String | Nil = nil, format : String | Nil = nil, min_doc_count : Int | Nil = nil)
Sourcedate_histogram(name : String, field : String, *, calendar_interval : String | Nil = nil, fixed_interval : String | Nil = nil, format : String | Nil = nil, min_doc_count : Int | Nil = nil, &)
Sourceexists(*fields)
Sourcefields
Sourcefilter(name : String, filters : Filter)
Sourcefilter(filters : Filter)
Sourcefilter(name : String, filters : Filter, &)
Sourcefilters(name : String, filters : NamedFilters, *, other_bucket : Bool | Nil = nil, other_bucket_key : String | Nil = nil)
Sourcefilters
Sourcefilters(name : String, filters : NamedFilters, *, other_bucket : Bool | Nil = nil, other_bucket_key : String | Nil = nil, &)
Sourcehas_parent(parent : Class, parent_index : String)
"has_parent" query.
Sets the index to the parent
index
Sourcelimit
Sourcemax(name : String, field : String)
Sourcemin(name : String, field : String)
Sourceminimum_should_match(count : Int)
Sourceminimum_should_match
Sourcemissing(name : String, field : String)
Sourcemissing(*fields)
Call to add fields that should be missing Effectively adds a filter that ensures a field is missing
must
Sourcemust_not
Sourcenested(name : String, path : String)
Sourcenested(name : String, path : String, &)
Sourceoffset
Sourceparent
Sourcequery_settings
Sourcerange(name : String, field : String, ranges : AggRanges, *, keyed : Bool | Nil = nil)
Sourcerange(filter)
Sourcerange
Sourcerange(name : String, field : String, ranges : AggRanges, *, keyed : Bool | Nil = nil, &)
Sourceraw_filter(clause : JSON::Any)
Append a raw Elasticsearch clause verbatim into the bool filter array.
Use for clauses the typed DSL can't express — e.g. a should/
minimum_should_match group combining a range with a missing-field
check, or an OR across two range fields.
reverse_nested(name : String, path : String | Nil = nil)
Sourcereverse_nested(name : String, path : String | Nil = nil, &)
Sourcesearch
Sourcesearch_after
Sourcesearch_field(field)
Sourceshould(filters : Filter)
Like filter, but at least one should match in absence of filter/must hits
should
Sourcesort(sort : Sort)
Sourcesort
Sourcestats(name : String, field : String)
Sourcesum(name : String, field : String)
Sourceterms(name : String, field : String, *, size : Int | Nil = nil, order : Hash(String, String) | Nil = nil, min_doc_count : Int | Nil = nil)
Sourceterms(name : String, field : String, *, size : Int | Nil = nil, order : Hash(String, String) | Nil = nil, min_doc_count : Int | Nil = nil, &)
SourceNested types
- Neuroplastic::Query::AggHash
- Neuroplastic::Query::AggRanges
- Neuroplastic::Query::AggScalar
- Neuroplastic::Query::AggValue
- Neuroplastic::Query::AggregationBuilder
- Neuroplastic::Query::Aggs
- Neuroplastic::Query::Filter
- Neuroplastic::Query::FilterTerm
- Neuroplastic::Query::FilterValue
- Neuroplastic::Query::NamedFilters
- Neuroplastic::Query::NotExistsFilter
- Neuroplastic::Query::RangeQuery
- Neuroplastic::Query::RangeValue
- Neuroplastic::Query::SearchAfter
- Neuroplastic::Query::Sort
- Neuroplastic::Query::Subfilter