-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Searching question #72
Comments
I've tried
and
with no joy. Seems to only return |
Show me index mapping definition |
edited above |
Ah, I was missing "type: date" from the index. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a model with a one-to-many association. It's indexed on [:start], ie
field :start, value: ->(thing) { thing.bars.map(&:start) }
Foo
has_manyBars
Bar
belongs_toFoo
Each
bar
has a field calledstart
which is aDateTime
. I want to get anyfoo
objects with at least onebar
that occurs in the future. So that should not include anyfoo
s with nobar
s orbar
s with only past dates.Using the Chewy syntax, I'd like to query ElasticSearch to retrieve all
foo
objects with at least onebar
wherestart > Time.zone.now
.I've tried a few ways but it's not obvious how to do that. (not sure if this an "issue" but a usage question!)
The text was updated successfully, but these errors were encountered: