Skip to content

Commit 54127dd

Browse files
committed
feat: Use peliasQuery analyzer for address_parts.street
This is an experimental change, but one that has good impact when paired with pelias/schema#446. Essentially, this change continues the trend we have started for the `name.*` and `phrase.*` fields to generate synonyms _only_ at index time. It may be the case that variations on input vs data text (for example `crt` vs `ct` vs `court`) may cause different synonyms to be generated by the same analyzer. Many queries, especially `match_phrase` queries, will require that _all_ of those generated synonym tokens must match. This is often not desirable.
1 parent a3fc0b6 commit 54127dd

14 files changed

Lines changed: 16 additions & 16 deletions

query/autocomplete_defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ module.exports = _.merge({}, peliasQuery.defaults, {
4242
'address:housenumber:boost': 2,
4343
'address:housenumber:cutoff_frequency': 0.01,
4444

45-
'address:street:analyzer': 'peliasStreet',
45+
'address:street:analyzer': 'peliasQuery',
4646
'address:street:field': 'address_parts.street',
4747
'address:street:boost': 1,
4848
'address:street:cutoff_frequency': 0.01,
4949

50-
'address:cross_street:analyzer': 'peliasStreet',
50+
'address:cross_street:analyzer': 'peliasQuery',
5151
'address:cross_street:field': 'address_parts.cross_street',
5252
'address:cross_street:boost': 5,
5353
'address:cross_street:cutoff_frequency': 0.01,

query/search_defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = _.merge({}, peliasQuery.defaults, {
4141
'address:housenumber:boost': 2,
4242
'address:housenumber:cutoff_frequency': 0.01,
4343

44-
'address:street:analyzer': 'peliasStreet',
44+
'address:street:analyzer': 'peliasQuery',
4545
'address:street:field': 'address_parts.street',
4646
'address:street:boost': 5,
4747
'address:street:slop': 1,

test/unit/fixture/autocomplete_single_character_street.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module.exports = {
3939
'query': 'k road',
4040
'cutoff_frequency': 0.01,
4141
'boost': 1,
42-
'analyzer': 'peliasStreet'
42+
'analyzer': 'peliasQuery'
4343
}
4444
}
4545
},

test/unit/fixture/search_boundary_country.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'match_phrase': {
1515
'address_parts.street': {
1616
'query': 'street value',
17-
'analyzer': 'peliasStreet',
17+
'analyzer': 'peliasQuery',
1818
'slop': 1
1919
}
2020
}

test/unit/fixture/search_boundary_country_multi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'match_phrase': {
1515
'address_parts.street': {
1616
'query': 'street value',
17-
'analyzer': 'peliasStreet',
17+
'analyzer': 'peliasQuery',
1818
'slop': 1
1919
}
2020
}

test/unit/fixture/search_boundary_gid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'match_phrase': {
1515
'address_parts.street': {
1616
'query': 'street value',
17-
'analyzer': 'peliasStreet',
17+
'analyzer': 'peliasQuery',
1818
'slop': 1
1919
}
2020
}

test/unit/fixture/search_fallback.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module.exports = {
110110
'match_phrase': {
111111
'address_parts.street': {
112112
'query': 'street value',
113-
'analyzer': 'peliasStreet',
113+
'analyzer': 'peliasQuery',
114114
'slop': 1
115115
}
116116
}
@@ -278,7 +278,7 @@ module.exports = {
278278
'match_phrase': {
279279
'address_parts.street': {
280280
'query': 'street value',
281-
'analyzer': 'peliasStreet',
281+
'analyzer': 'peliasQuery',
282282
'slop': 1
283283
}
284284
}

test/unit/fixture/search_linguistic_bbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'match_phrase': {
1515
'address_parts.street': {
1616
'query': 'street value',
17-
'analyzer': 'peliasStreet',
17+
'analyzer': 'peliasQuery',
1818
'slop': 1
1919
}
2020
}

test/unit/fixture/search_linguistic_focus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'match_phrase': {
1515
'address_parts.street': {
1616
'query': 'street value',
17-
'analyzer': 'peliasStreet',
17+
'analyzer': 'peliasQuery',
1818
'slop': 1
1919
}
2020
}

test/unit/fixture/search_linguistic_focus_bbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
'match_phrase': {
1515
'address_parts.street': {
1616
'query': 'street value',
17-
'analyzer': 'peliasStreet',
17+
'analyzer': 'peliasQuery',
1818
'slop': 1
1919
}
2020
}

0 commit comments

Comments
 (0)