You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a query that I am getting back from opensearch that has a Hit of a parent, and alongside that, I added the option to retrieve all the children of that parent document as Innerhits.
I've included an example below of the query, where I think it should be getting a parent that has a child document of type childType, and then in the innerhits, get the children for it.
Hit.java is able to convert the response to the java class for the parent perfectly fine, however when trying to convert its children, it fails because each InnerHit included with the parent Hit does not have a index specified in the response. I believe it was done under the intention that the the index of the InnerHits should always match the parent, however, the conversion is not aware of the Parent document's index for the InnerHit.
How can one reproduce the bug?
Steps to reproduce the behavior.
Reproduction steps would be to create two documents, and associate a parent-child relation to them. And then run a query for a property that would match the parent, and then adding the innerHits field:
it.innerHits {
it.source {
it.fetch(true)
}
}
What is the expected behavior?
A clear and concise description of what you expected to happen.
Hit.java should be able to convert the InnerHits into Hit objects properly.
What is your host/environment?
Operating system, version.
MacOS 14.2.1
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
I have to wonder why the index is set to mandatory? I did see a discussion on elasticsearch back in 2016 elastic/elasticsearch#18091 but I am not sure if it's the same.
The text was updated successfully, but these errors were encountered:
Starting with elasticsearch v5.0 _index, _type, _id aren't included with inner nested hits.
Nested inner hits will now no longer include _index, _type and _id keys. For nested inner hits these values are always the same as the _index, _type and _id keys of the root search hit.
What is the bug?
A clear and concise description of the bug.
I have a query that I am getting back from opensearch that has a Hit of a parent, and alongside that, I added the option to retrieve all the children of that parent document as Innerhits.
I've included an example below of the query, where I think it should be getting a parent that has a child document of type
childType
, and then in the innerhits, get the children for it.Hit.java is able to convert the response to the java class for the parent perfectly fine, however when trying to convert its children, it fails because each InnerHit included with the parent Hit does not have a index specified in the response. I believe it was done under the intention that the the index of the InnerHits should always match the parent, however, the conversion is not aware of the Parent document's index for the InnerHit.
How can one reproduce the bug?
Steps to reproduce the behavior.
Reproduction steps would be to create two documents, and associate a parent-child relation to them. And then run a query for a property that would match the parent, and then adding the innerHits field:
What is the expected behavior?
A clear and concise description of what you expected to happen.
Hit.java should be able to convert the InnerHits into Hit objects properly.
What is your host/environment?
Operating system, version.
MacOS 14.2.1
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
I have to wonder why the index is set to mandatory? I did see a discussion on elasticsearch back in 2016 elastic/elasticsearch#18091 but I am not sure if it's the same.
The text was updated successfully, but these errors were encountered: