Child_type field order in hash_child json block changes the ouput result


(Giovanni oo) #1

The order of "child_type" generated using Java API for DSL queries, seems
to be wrong, the attached generated json does not carry out results.
The problems seems to be due to the position of that field position. Moving
the "child_type" before "query", the json query works ok.

"has_child" : {
"query" : {
"query_string" : {
"query" : "iPhone",
"fields" : [ "ResourceURI" ]
}
},
"child_type" : "facebookChild",
"score_type" : "sum"
}

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/088cd282-9af2-41e1-94b1-c6cd3d7dd43a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Binh Ly-2) #2

I think you meant "type" instead of "child_type":

"has_child" : {
"query" : {},
"type" : "facebookChild",
"score_type" : "sum"
}

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8b57ce8a-a6b9-4a5e-b5e4-4e622f609e58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Giovanni oo) #3

The Java API generates "child_type" field. However I read the Elasticsearch
Java code and "child_type" is like the "type" field.

Il giorno venerdì 4 aprile 2014 00:01:36 UTC+2, Binh Ly ha scritto:

I think you meant "type" instead of "child_type":

"has_child" : {
"query" : {},
"type" : "facebookChild",
"score_type" : "sum"
}

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3e215230-86ed-4c75-829d-1adef0570853%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Binh Ly-2) #4

You're right. I still can't seem to reproduce your problem. May I ask which
version of ES?

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c1c9f2c7-466e-4bef-a3f8-1aeebb36cd4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #5