-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't boost street if parse is ambiguous #1479
Conversation
Cool, this makes a lot of sense. I'll test it out next week! |
something else this should probably do is that if the parse is ambiguous, consume the whole query it would fix queries like and KT Auto Repair |
91f3c72
to
074e99c
Compare
I just gave this PR a full run through all our tests, and it looks good. There are some improvements to POI related tests, such as the following: There were very minimal changes to address queries that are not worth worrying about. Here's an example of the magnitude of the changes As far as I'm concerned from a behavior perspective this PR is good to merge. @missinglink do you have any thoughts on the code? It does add even more logic to our already complex |
return ( | ||
streetOnlySolution && | ||
venueOnlySolution && | ||
streetOnlySolution.pair[0].span.body === venueOnlySolution.pair[0].span.body && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can put this before const restOfSolutionIsTheSame =....
? something like
if (!streetOnlySolution || !venueOnlySolution || streetOnlySolution.pair[0].span.body !== venueOnlySolution.pair[0].span.body) {
return false
}
I think this is basically a no-op on top of 1308, I'm happy to just close it |
@blackmad Its a no-op for autocomplete, but not necessarily search, so it might still be useful. |
okay true you're right. This is still important for "wrigley field" in search |
074e99c
to
c2d814a
Compare
This is a redo of #1430 that's on the pelias repo rather than on mine, and fixed for place->venue rename
It fixes
mccarren park
andwrigley field
as well asmccarren park brooklyn
andwrigley field chicago
this was the original approach suggested by @missinglink for solving "wrigley field" - I don't see a great way to solve it in pelias/parser at the moment, though I'm open to suggestions.
doesn't change anything in a 1k query set.