From 4266754d8415ca57402a01b00283668ee2861858 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 4 Feb 2021 08:26:12 -0800 Subject: [PATCH] WIP: skip street parse when its also the subject --- query/text_parser_pelias.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/query/text_parser_pelias.js b/query/text_parser_pelias.js index 8a36d4835..56395a9df 100644 --- a/query/text_parser_pelias.js +++ b/query/text_parser_pelias.js @@ -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