Browse Source

Fix unit tests due to new version of pelias-query

pull/443/head
Diana Shkolnikov 9 years ago
parent
commit
ab5004273b
  1. 16
      test/unit/fixture/autocomplete_linguistic_final_token.js
  2. 16
      test/unit/fixture/autocomplete_linguistic_focus.js
  3. 16
      test/unit/fixture/autocomplete_linguistic_focus_null_island.js
  4. 16
      test/unit/fixture/autocomplete_linguistic_multiple_tokens.js
  5. 16
      test/unit/fixture/autocomplete_linguistic_only.js
  6. 20
      test/unit/fixture/autocomplete_linguistic_with_admin.js
  7. 16
      test/unit/fixture/search_boundary_country.js
  8. 16
      test/unit/fixture/search_full_address.js
  9. 16
      test/unit/fixture/search_linguistic_bbox.js
  10. 16
      test/unit/fixture/search_linguistic_focus.js
  11. 16
      test/unit/fixture/search_linguistic_focus_bbox.js
  12. 16
      test/unit/fixture/search_linguistic_focus_null_island.js
  13. 16
      test/unit/fixture/search_linguistic_only.js
  14. 20
      test/unit/fixture/search_linguistic_viewport.js
  15. 20
      test/unit/fixture/search_linguistic_viewport_min_diagonal.js
  16. 16
      test/unit/fixture/search_partial_address.js
  17. 16
      test/unit/fixture/search_regions_address.js

16
test/unit/fixture/autocomplete_linguistic_final_token.js

@ -31,15 +31,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -60,15 +56,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 3
}]

16
test/unit/fixture/autocomplete_linguistic_focus.js

@ -75,15 +75,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -104,15 +100,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 3
}]

16
test/unit/fixture/autocomplete_linguistic_focus_null_island.js

@ -75,15 +75,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -104,15 +100,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 3
}]

16
test/unit/fixture/autocomplete_linguistic_multiple_tokens.js

@ -42,15 +42,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -71,15 +67,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 3
}]

16
test/unit/fixture/autocomplete_linguistic_only.js

@ -31,15 +31,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -60,15 +56,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 3
}]

20
test/unit/fixture/autocomplete_linguistic_with_admin.js

@ -99,18 +99,14 @@ module.exports = {
{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}
],
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
}
'boost_mode': 'replace'
}
},
{
@ -131,18 +127,14 @@ module.exports = {
{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 3
}
],
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
}
'boost_mode': 'replace'
}
}
]

16
test/unit/fixture/search_boundary_country.js

@ -49,15 +49,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -78,15 +74,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

16
test/unit/fixture/search_full_address.js

@ -41,15 +41,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -70,15 +66,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

16
test/unit/fixture/search_linguistic_bbox.js

@ -39,15 +39,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -68,15 +64,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

16
test/unit/fixture/search_linguistic_focus.js

@ -69,15 +69,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -98,15 +94,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

16
test/unit/fixture/search_linguistic_focus_bbox.js

@ -69,15 +69,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -98,15 +94,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

16
test/unit/fixture/search_linguistic_focus_null_island.js

@ -69,15 +69,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -98,15 +94,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

16
test/unit/fixture/search_linguistic_only.js

@ -39,15 +39,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -68,15 +64,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

20
test/unit/fixture/search_linguistic_viewport.js

@ -77,18 +77,14 @@ module.exports = {
{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}
],
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
}
'boost_mode': 'replace'
}
},
{
@ -109,18 +105,14 @@ module.exports = {
{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}
],
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
}
'boost_mode': 'replace'
}
}
]

20
test/unit/fixture/search_linguistic_viewport_min_diagonal.js

@ -77,18 +77,14 @@ module.exports = {
{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}
],
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
}
'boost_mode': 'replace'
}
},
{
@ -109,18 +105,14 @@ module.exports = {
{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}
],
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
}
'boost_mode': 'replace'
}
}
]

16
test/unit/fixture/search_partial_address.js

@ -41,15 +41,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -70,15 +66,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

16
test/unit/fixture/search_regions_address.js

@ -41,15 +41,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'popularity'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'popularity'
'field': 'popularity',
'missing': 1
},
'weight': 1
}]
@ -70,15 +66,11 @@ module.exports = {
'max_boost': 20,
'score_mode': 'first',
'boost_mode': 'replace',
'filter': {
'exists': {
'field': 'population'
}
},
'functions': [{
'field_value_factor': {
'modifier': 'log1p',
'field': 'population'
'field': 'population',
'missing': 1
},
'weight': 2
}]

Loading…
Cancel
Save