Thanks Honza, worked like a charm!
Just as a pointer to other people, your second code only worked when
putting the @timestamp between quotes (you probably forgot it there).
Thanks.
On Tuesday, October 21, 2014 12:27:04 PM UTC-3, Honza Král wrote:
>
> Hi Antonio,
> you might dave to use:
> F("range", **{'@timestamp': {"from":1413815328968, "to":1413901728968}})
>
> or
>
> F({"range": {@timestamp: {"from":1413815328968, "to":1413901728968}}})
>
> both of these should work.
>
> On Tue, Oct 21, 2014 at 4:32 PM, Antonio Augusto Santos
> <[email protected] <javascript:>> wrote:
> > Hi,
> >
> > I'm trying to start using ES-DSL-PY to do some quick tests on my
> environment
> > and I've faced one problem.
> > Whats the correct way to use it in a range filter? I plain json the
> Syntax
> > would be something like:
> >
> >
> > "range": {
> > "@timestamp": {
> > "from": 1413815328968,
> > "to": 1413901728968
> > }
> > }
> >
> >
> > When I try to convert it to python I'd end with something like
> >
> > F("range", @timestamp={"from":1413815328968, "to":1413901728968})
> >
> >
> > But the @timestamp is a wrong Python Syntax.
> > Any recommendations on how to do it, while still using EDP syntax?
> >
> > Thanks in advance.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "elasticsearch" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to [email protected] <javascript:>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/elasticsearch/e10ca84b-c1b5-4ea6-9db6-004c5c5c6fb9%40googlegroups.com.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a81e568a-efa4-48e0-9f4c-b9b43fc92c47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.