class Neuroplastic::Query
- Neuroplastic::Query
- Reference
- Object
Defined in:
neuroplastic/query.crConstant Summary
-
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)
- .new(search : String, limit : Int32 = 100, offset : Int32 = 0)
Instance Method Summary
- #build
- #child : String | Nil
- #exists(*fields)
- #fields : Array(String)
- #filter(filters : Filter)
- #filters : Filter
-
#has_child(child : Class)
Applies the query to child objects
-
#has_parent(parent : Class, parent_index : String)
"has_parent" query.
- #index : String | Nil
- #limit : Int32
- #minimum_should_match(count : Int)
- #minimum_should_match : Int32 | Nil
-
#missing(*fields)
Call to add fields that should be missing Effectively adds a filter that ensures a field is missing
-
#must(filters : Filter)
Like filter, but all hits must match each filter
- #must : Filter
-
#must_not(filters : Filter)
The opposite of filter, essentially a not
- #must_not : Filter
- #offset : Int32
- #parent : String | Nil
- #query_settings : Hash(String, String) | Nil
- #range(filter)
- #range : RangeQuery
- #search : String
- #search_after : SearchAfter | Nil
- #search_field(field)
- #should(filters : Filter)
- #should : Filter
- #sort(sort : Sort)
- #sort : Array(Sort)
Constructor Detail
def self.new(params : HTTP::Params | Hash(String, String | Array(String)) | Hash(Symbol, String | Array(String)) = {} of String => String)
#
Instance Method Detail
def has_parent(parent : Class, parent_index : String)
#
"has_parent" query.
Sets the index to the parent
def missing(*fields)
#
Call to add fields that should be missing Effectively adds a filter that ensures a field is missing