class

LuckySearch::Query

Inherits Reference < Object

Constants

RANGE_PARAMS = {:gte, :gt, :lte, :lt, :boost}

Constructors

new(params : HTTP::Params | Hash(String, String) | Hash(Symbol, String) = {} of String => String)
Source
new(search : String, limit : Int32 = 100, offset : Int32 = 0)
Source

Class methods

document_name(klass : Class) : String
Source

Instance methods

build
Source
child
Source
exists(*fields)
Source
fields
Source
filter(filters : Filter)
Source
filters
Source
has_child(child : Class)

Applies the query to child objects

Source
has_parent(parent : Class, parent_index : String)

"has_parent" query.

Sets the index to the parent

Source
index
Source
limit
Source
missing(*fields)

Call to add fields that should be missing Effectively adds a filter that ensures a field is missing

Source
must(filters : Filter)

Like filter, but all hits must match each filter

Source
must
Source
must_not(filters : Filter)

The opposite of filter, essentially a not

Source
must_not
Source
offset
Source
parent
Source
query_settings
Source
range(filter)
Source
range
Source
search
Source
search_field(field)
Source
should(filters : Filter)

Like filter, but at least one should match in absence of filter/must hits

Source
should
Source
sort(sort : Sort)
Source
sort
Source

Nested types