Skip to content

Commit

Permalink
Merge pull request #1234 from pelias/address-search-unit
Browse files Browse the repository at this point in the history
feat(search): use address unit in search_with_ids query
  • Loading branch information
orangejulius authored Nov 3, 2018
2 parents 32c295d + 02d22c2 commit d722002
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions query/address_search_using_ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,15 @@ function generateQuery( clean, res ){
if( ! _.isEmpty(clean.parsed_text.number) ){
vs.var( 'input:housenumber', clean.parsed_text.number );
}

if( ! _.isEmpty(clean.parsed_text.unit) ){
vs.var( 'input:unit', clean.parsed_text.unit );
}

if( ! _.isEmpty(clean.parsed_text.postalcode) ){
vs.var( 'input:postcode', clean.parsed_text.postalcode );
}

vs.var( 'input:street', clean.parsed_text.street );

// find the first granularity band for which there are results
Expand Down

0 comments on commit d722002

Please sign in to comment.