Skip to content

Commit

Permalink
WIP: skip street parse when its also the subject
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejulius committed Feb 5, 2021
1 parent 7a262d0 commit 4266754
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions query/text_parser_pelias.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ function addParsedVariablesToQueryVariables(clean, vs) {

// street name
if (!_.isEmpty(clean.parsed_text.street) && _.isEmpty(clean.parsed_text.cross_street)) {
// do not query the `street` field if this is an intersection parse
// otherwise the order of the intersection in the data will determine what results come first
vs.var('input:street', clean.parsed_text.street);
if (clean.parsed_text.street != clean.parsed_text.subject) {
// do not query the `street` field if this is an intersection parse
// otherwise the order of the intersection in the data will determine what results come first
vs.var('input:street', clean.parsed_text.street);
}
}

// cross street name
Expand Down

0 comments on commit 4266754

Please sign in to comment.