class LuckySearch::Query
- LuckySearch::Query
- Reference
- Object
Defined in:
lucky_search/query.crConstant Summary
-
RANGE_PARAMS =
{:gte, :gt, :lte, :lt, :boost}
Constructors
- .new(params : HTTP::Params | Hash(String, String) | Hash(Symbol, String) = {} of String => String)
- .new(search : String, limit : Int32 = 100, offset : Int32 = 0)
Class Method Summary
Instance Method Summary
- #build
- #child : String?
- #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?
- #limit : Int32
-
#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?
- #query_settings : Hash(String, String)?
- #range(filter)
- #range : RangeQuery
- #search : String
- #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) | Hash(Symbol, String) = {} of String => String)
#
Class Method Detail
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