We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the bug? Returns 0 records when using PPL query on nested fields
How can one reproduce the bug?
Example Mapping PUT /patients { "mappings": { "properties": { "patient": { "properties": { "name": { "type": "text" }, "id": { "type": "integer" }, "contacts": { "type": "nested", "properties": { "name": { "type": "keyword" }, "relationship": { "type": "keyword" }, "phone": { "type": "keyword" } } }, "associations": { "properties": { "job": { "type": "keyword" }, "title": { "type": "keyword" }, "email": { "type": "keyword" } } } } } } } }
Sample Document PUT /patients/_doc/1 { "patient": { "name": "John Doe", "id": 1, "contacts": [ { "name": "Jane Doe", "relationship": "mother", "phone": "5551111" }, { "name": "Joe Doe", "relationship": "father", "phone": "5552222" } ], "associations": { "job": "it", "title": "developer", "email": "[email protected]" } } }
Working query source = patients | where patient.associations.email = '[email protected]'
Not working on nested fields source = patients | where patient.contacts.name = 'Jane Doe'
What is the expected behavior? Expected to return all records whose contacts name is Jane Doe
What is your host/environment?
The text was updated successfully, but these errors were encountered:
xinyual
No branches or pull requests
What is the bug?
Returns 0 records when using PPL query on nested fields
How can one reproduce the bug?
Example Mapping
PUT /patients
{
"mappings": {
"properties": {
"patient": {
"properties": {
"name": {
"type": "text"
},
"id": {
"type": "integer"
},
"contacts": {
"type": "nested",
"properties": {
"name": {
"type": "keyword"
},
"relationship": {
"type": "keyword"
},
"phone": {
"type": "keyword"
}
}
},
"associations": {
"properties": {
"job": {
"type": "keyword"
},
"title": {
"type": "keyword"
},
"email": {
"type": "keyword"
}
}
}
}
}
}
}
}
Sample Document
PUT /patients/_doc/1
{
"patient": {
"name": "John Doe",
"id": 1,
"contacts": [
{
"name": "Jane Doe",
"relationship": "mother",
"phone": "5551111"
},
{
"name": "Joe Doe",
"relationship": "father",
"phone": "5552222"
}
],
"associations": {
"job": "it",
"title": "developer",
"email": "[email protected]"
}
}
}
Working query
source = patients | where patient.associations.email = '[email protected]'
Not working on nested fields
source = patients | where patient.contacts.name = 'Jane Doe'
What is the expected behavior?
Expected to return all records whose contacts name is Jane Doe
What is your host/environment?
The text was updated successfully, but these errors were encountered: