Skip to content

Commit

Permalink
fix: add has_parent elastic query
Browse files Browse the repository at this point in the history
  • Loading branch information
sydrawat01 committed Dec 2, 2023
1 parent 257fd45 commit 3386d25
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions static/elastic-queries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ GET /demo-3/_search
}
}

# PARENT CHILD RELATION
# PARENT CHILD RELATION: has_child
GET /demo-3/_search
{
"query": {
Expand All @@ -222,6 +222,27 @@ GET /demo-3/_search
}
}

# PARENT CHILD RELATION: has_parent
GET /demo-3/_search
{
"query": {
"has_parent": {
"parent_type": "linkedPlanServices",
"query": {
"bool": {
"must": [
{
"match": {
"objectId": "27283xvx9asdff-504"
}
}
]
}
}
}
}
}

# WILDCARD TEXT SEARCH 1: search text
GET /demo-3/_search
{
Expand Down Expand Up @@ -316,7 +337,7 @@ GET /demo-3/_search
}
}

# FAILED QUERY
# FAILED QUERY: has_parent
GET /demo-3/_search
{
"query": {
Expand Down

0 comments on commit 3386d25

Please sign in to comment.