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

Working regular expression filters #285

Open
tyrasd opened this issue Nov 23, 2020 · 1 comment
Open

Working regular expression filters #285

tyrasd opened this issue Nov 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@tyrasd
Copy link
Member

tyrasd commented Nov 23, 2020

There's already some functionality in the OSHDB to filter by OSM tags using regular expressions. But the current implementation does not work on distributed backends (Ignite) because of the non-serializable nature of connections to the keytables database.

I see two possible ways to go forward:

  1. implement a regex -> OSHDBTag matching on the client
  2. if get rid of global keytables #225 is implemented (i.e. the string tables are distributed as well), regexes can be directly matched with the actualy OSM tags on the server
@tyrasd tyrasd added the enhancement New feature or request label Nov 23, 2020
@tyrasd
Copy link
Member Author

tyrasd commented Nov 23, 2020

Some initial comments:

Solution 1 has the downside that it only works for "well behaved" regexes which don't match too many tags: it would be problematic when used with unspecific filters like .osmTag("name", Pattern.compile("^[a-z]")) as the amount of tags this translates to could be enormous.

Solution 2 can also optionally have an optimized path which uses solution 1 in cases where it is known that the regex does not produce too many results. But IMHO that would be low priority, because in such cases end users can already choose to use to use an "expanded" non-regex variant of their query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
OSHDB-Datamodel revision
  
Awaiting triage
Development

No branches or pull requests

1 participant