Browse Source

fix

pull/378/head
Peter Johnson 9 years ago
parent
commit
cf9c56928c
  1. 21
      query/autocomplete.js

21
query/autocomplete.js

@ -19,15 +19,18 @@ var focus = peliasQuery.view.focus( peliasQuery.view.phrase );
var _tmpview = function( vs ){ var _tmpview = function( vs ){
var view = focus( vs ); var view = focus( vs );
view.function_score.filter = {
'or': [ if( view && view.hasOwnProperty('function_score') ){
{ 'type': { 'value': 'osmnode' } }, view.function_score.filter = {
{ 'type': { 'value': 'osmway' } }, 'or': [
{ 'type': { 'value': 'osmaddress' } }, { 'type': { 'value': 'osmnode' } },
{ 'type': { 'value': 'openaddresses' } }, { 'type': { 'value': 'osmway' } },
{ 'type': { 'value': 'geoname' } }, { 'type': { 'value': 'osmaddress' } },
] { 'type': { 'value': 'openaddresses' } },
}; { 'type': { 'value': 'geoname' } },
]
};
}
// console.log( JSON.stringify( view, null, 2 ) ); // console.log( JSON.stringify( view, null, 2 ) );
return view; return view;

Loading…
Cancel
Save