Skip to content

Commit

Permalink
feat(query) use full match_phrase query
Browse files Browse the repository at this point in the history
This updates the fixture expectations for
pelias/query#100 which uses the full
`match_phrase` query format everywhere for consistency and to allow
adding future parameters easily.
  • Loading branch information
orangejulius committed Jun 18, 2019
1 parent 54be05f commit b86f562
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 15 deletions.
4 changes: 3 additions & 1 deletion test/unit/fixture/search_boundary_country.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_boundary_country_multi.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_boundary_gid.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
20 changes: 15 additions & 5 deletions test/unit/fixture/search_fallback.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.number': 'number value'
'address_parts.number': {
'query': 'number value'
}
}
},
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
},
{
Expand Down Expand Up @@ -181,7 +185,9 @@ module.exports = {
'should': [
{
'match_phrase': {
'address_parts.zip': 'postalcode value'
'address_parts.zip': {
'query': 'postalcode value'
}
}
}
],
Expand Down Expand Up @@ -268,7 +274,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
},
{
Expand Down Expand Up @@ -343,7 +351,9 @@ module.exports = {
'should': [
{
'match_phrase': {
'address_parts.zip': 'postalcode value'
'address_parts.zip': {
'query': 'postalcode value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_linguistic_bbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_linguistic_focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_linguistic_focus_bbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_linguistic_focus_null_island.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_linguistic_only.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_with_category_filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion test/unit/fixture/search_with_source_filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ module.exports = {
'must': [
{
'match_phrase': {
'address_parts.street': 'street value'
'address_parts.street': {
'query': 'street value'
}
}
}
],
Expand Down

0 comments on commit b86f562

Please sign in to comment.