Skip to content

Commit e5b712f

Browse files
committed
WIP: skip street parse when its also the subject
1 parent 0a964c2 commit e5b712f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: query/text_parser_pelias.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ function addParsedVariablesToQueryVariables(clean, vs) {
2828

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

3638
// cross street name

0 commit comments

Comments
 (0)