When i try to search with nested filter on "nested_docs.nested_doc1" http://pastebin.com/FJuLytjH, the result is collection of documents,
but when "path" is changed to "nested_docs.nested_doc2" empty result
is returned. It is similar with using nested_docs.nested_doc3 and
nested_docs.nested_doc4, only path with "nested_docs.nested_doc4"
returns collection of documents. So it seems to me when 2 nested
documents have same property name it is possible to query only one of
them with successful results. Is it a bug?
Could anyone please help me with this nested documents problem? I
found only it works when each nested document has unique named
properties, but i guess there is other way to sort it out?
When i try to search with nested filter on "nested_docs.nested_doc1"{ "filter": { "nested": { "path": "nested_docs.nested - Pastebin.com, the result is collection of documents,
but when "path" is changed to "nested_docs.nested_doc2" empty result
is returned. It is similar with using nested_docs.nested_doc3 and
nested_docs.nested_doc4, only path with "nested_docs.nested_doc4"
returns collection of documents. So it seems to me when 2 nested
documents have same property name it is possible to query only one of
them with successful results. Is it a bug?
You have here two level of nested mapping, nested_docs, and then another
one. So, you need to have two level of nested queries/filters to execute on
the second level one. Though, I am not sure you really need the nested_docs
level to be nested type.
When i try to search with nested filter on "nested_docs.nested_doc1" { "filter": { "nested": { "path": "nested_docs.nested - Pastebin.com, the result is collection of documents,
but when "path" is changed to "nested_docs.nested_doc2" empty result
is returned. It is similar with using nested_docs.nested_doc3 and
nested_docs.nested_doc4, only path with "nested_docs.nested_doc4"
returns collection of documents. So it seems to me when 2 nested
documents have same property name it is possible to query only one of
them with successful results. Is it a bug?
Thanks for tip, but it didn´t sort the problem out. I tried 2 level nested
queries then i remapping index and kept nested_docs without nested mapping
same result like before. Finally i created index without nested_docs at
all, so every nested doc was directly in the root document, but results
were same again. It is really strange, because only query on nested_doc1
and nested_doc4 are successful. Why not nested_doc2 and nested_doc3?
On Sunday, March 25, 2012 12:32:15 PM UTC+2, kimchy wrote:
You have here two level of nested mapping, nested_docs, and then another
one. So, you need to have two level of nested queries/filters to execute on
the second level one. Though, I am not sure you really need the nested_docs
level to be nested type.
On Wed, Mar 21, 2012 at 11:17 AM, Petr Jancarik wrote:
When i try to search with nested filter on "nested_docs.nested_doc1" { "filter": { "nested": { "path": "nested_docs.nested - Pastebin.com, the result is collection of documents,
but when "path" is changed to "nested_docs.nested_doc2" empty result
is returned. It is similar with using nested_docs.nested_doc3 and
nested_docs.nested_doc4, only path with "nested_docs.nested_doc4"
returns collection of documents. So it seems to me when 2 nested
documents have same property name it is possible to query only one of
them with successful results. Is it a bug?
Thanks for tip, but it didn´t sort the problem out. I tried 2 level nested
queries then i remapping index and kept nested_docs without nested mapping
same result like before. Finally i created index without nested_docs at
all, so every nested doc was directly in the root document, but results
were same again. It is really strange, because only query on nested_doc1
and nested_doc4 are successful. Why not nested_doc2 and nested_doc3?
On Sunday, March 25, 2012 12:32:15 PM UTC+2, kimchy wrote:
You have here two level of nested mapping, nested_docs, and then another
one. So, you need to have two level of nested queries/filters to execute on
the second level one. Though, I am not sure you really need the nested_docs
level to be nested type.
On Wed, Mar 21, 2012 at 11:17 AM, Petr Jancarik wrote:
When i try to search with nested filter on "nested_docs.nested_doc1" { "filter": { "nested": { "path": "nested_docs.nested - Pastebin.com, the result is collection of documents,
but when "path" is changed to "nested_docs.nested_doc2" empty result
is returned. It is similar with using nested_docs.nested_doc3 and
nested_docs.nested_doc4, only path with "nested_docs.nested_doc4"
returns collection of documents. So it seems to me when 2 nested
documents have same property name it is possible to query only one of
them with successful results. Is it a bug?
Finally i found the way how to query nested documents. It wasn´t clear in
documentation. For addressing a field in nested query i used full path "
nested_docs.nested_doc2.user_id".
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.