Is your feature request related to a problem? Please describe.
I have a use case where a index should return records ordered by a string field, though records with an empty value must be returned first.
Lets assume an index with Person instances that have a first_name field.
Person.new(first_name: 'A')
Person.new(first_name: 'Z')
Person.new(first_name: null/nil)
The index query should return the person without a first_name first, regardless of the order direction (ascending/descending).
Describe the solution you'd like
The elasticsearch documentation lists an missing-option which would be ideal for my use case.
Additional context
Maybe this option already exists and it's not documented in chewy, but even by looking throught the documentation I couldn't find it.
Is your feature request related to a problem? Please describe.
I have a use case where a index should return records ordered by a string field, though records with an empty value must be returned first.
Lets assume an index with
Personinstances that have afirst_namefield.The index query should return the person without a first_name first, regardless of the order direction (ascending/descending).
Describe the solution you'd like
The elasticsearch documentation lists an
missing-option which would be ideal for my use case.Additional context
Maybe this option already exists and it's not documented in chewy, but even by looking throught the documentation I couldn't find it.