Skip to content
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

All structured queries show result match_type as fallback #780

Merged
merged 1 commit into from
Jan 24, 2017

Conversation

dianashk
Copy link
Contributor

Fixes pelias/pelias#493

Looks like all queries of the fallback variety were suffering from this issue, not only structured. It would show up anytime there was a query that had city identified by the query parser.

Copy link
Member

@orangejulius orangejulius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lots of code but it looks great

*
* They do not map 1:1 to our layers so the following somewhat complicated
* mapping structure is needed to set clear rules for comparing what was requested
* by the query and what has been received as a result to determine if a fallback occurred.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes. complicated, but i think necessary and pretty readable.


return (
// verify that more granular properties are not set
notSet(req.clean.parsed_text, rule.notSet) &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part ends up really clean, quite nice

@dianashk dianashk merged commit 307598c into master Jan 24, 2017
@orangejulius orangejulius deleted the fix-match-type-structured branch November 14, 2017 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants