Skip to content

Commit

Permalink
feat(structured): use both parent.postalcode & address_parts.zip for …
Browse files Browse the repository at this point in the history
…postalcode subqueries.
  • Loading branch information
missinglink committed Apr 16, 2024
1 parent e930786 commit 0c510a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion layout/StructuredFallbackQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ function addPostCode(vs) {
vs.var('input:postcode').toString(),
'postalcode',
[
'parent.postalcode'
'parent.postalcode',
'address_parts.zip'
],
false
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@
"multi_match": {
"query": "postcode value",
"type": "phrase",
"fields": ["parent.postalcode"]
"fields": [
"parent.postalcode",
"address_parts.zip"
]
}
}
],
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/structuredFallbackQuery/postcode.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"query": "postcode value",
"type": "phrase",
"fields": [
"parent.postalcode"
"parent.postalcode",
"address_parts.zip"
]
}
}
Expand Down

0 comments on commit 0c510a3

Please sign in to comment.