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

issue 36: first pass at returning unparsed prefix #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

missinglink
Copy link
Member

[do not merge]

this PR adds support for returning the unparsed prefix from user input as described in #36

closes #36

@missinglink
Copy link
Member Author

missinglink commented Apr 12, 2018

note: this PR is fairly old now, two other PRs have landed since which add additional capability related to returning masks of which tokens were used for matching.

I'm leaving this open for now to remind me of how we planned to address this feature.

also requires a rebase and fix once #80 is merged.

@orangejulius
Copy link
Member

This would still be useful, right? If so, and you think it's likely we'll actually do it, let me know. Otherwise, please close :)

@missinglink
Copy link
Member Author

I'd have to look at it again now the other PRs are merged.

It's a great feature to add, we wanted to get more information from placeholder about the parses it makes, so I first added an internal 'mask' feature which tracks which tokens are matched and which are not.

The current status of that is that it's an internal API which may need to be exposed via the REST API.

This PR extends on that, allowing placeholder to return (verbatim) all the tokens to the left of the most granular match.

It's functionality which Stephen requested, it essentially lays the groundwork for getting off addressit if we can start using placeholder as the default parser for autocomplete queries.

But yea, need to go over the code again and discuss what corresponding changes need to be made in pelias/api and what benefits we would get out of it by merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

return unknown/leftover tokens
2 participants