Why shouldn't the filter match both documents? Both of them contain a
nested document that satisfies the query/filter. Note that elasticsearch
will return the entire contents of the parent document, which will include
all of the nested documents.
I'm having trouble constructing a filter on a nested type in a document
and was wondering if anyone had any pointers or suggestions: gist:7cae7ff9cfcc555cb9ee · GitHub
If i correctly understood your probleme, I think I would solve it with a
"nested filter" encapsulating an "and filter" encapsulating two "range
filters"
Le mercredi 10 juillet 2013 19:03:43 UTC+2, Adam A. a écrit :
I'm having trouble constructing a filter on a nested type in a document
and was wondering if anyone had any pointers or suggestions: gist:7cae7ff9cfcc555cb9ee · GitHub
Thanks for replying. The filter I included should indeed match both docs,
but the behaviour I am looking for is a filter that would only examine an
individual date's start and end ... essential treating each nested date as
a data set. To put it another way, I want to find any departures that have
a single date with a start gte some_date and an end date lte some_date.
Adam
On Wednesday, 10 July 2013 23:18:25 UTC-4, Ivan Brusic wrote:
Why shouldn't the filter match both documents? Both of them contain a
nested document that satisfies the query/filter. Note that elasticsearch
will return the entire contents of the parent document, which will include
all of the nested documents.
I'm having trouble constructing a filter on a nested type in a document
and was wondering if anyone had any pointers or suggestions: gist:7cae7ff9cfcc555cb9ee · GitHub
--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
I figured I probably have to use an "and" filter somewhere but part of my
problem is I am having difficulty figuring out how the nesting works with
the query dsl. I did try this:
but that just gave me the same results as the original filtered query.
Adam
On Thursday, 11 July 2013 08:35:01 UTC-4, DH wrote:
Hello.
If i correctly understood your probleme, I think I would solve it with a
"nested filter" encapsulating an "and filter" encapsulating two "range
filters"
Le mercredi 10 juillet 2013 19:03:43 UTC+2, Adam A. a écrit :
I'm having trouble constructing a filter on a nested type in a document
and was wondering if anyone had any pointers or suggestions: gist:7cae7ff9cfcc555cb9ee · GitHub
You got both documents back because your filtered query filter containing
the dates filters brings back all the docs (build on a match_all query)
thats have both dates, not on a per nested doc basis .
Then, you put that in a nested filter but the damage has been done already.
Sorry if I am not clear, english is not my first language.
Le mercredi 10 juillet 2013 19:03:43 UTC+2, Adam A. a écrit :
I'm having trouble constructing a filter on a nested type in a document
and was wondering if anyone had any pointers or suggestions: gist:7cae7ff9cfcc555cb9ee · GitHub
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.