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

django like filter wont work for various wildcard chars #80

Open
jokiefer opened this issue Nov 14, 2023 · 0 comments
Open

django like filter wont work for various wildcard chars #80

jokiefer opened this issue Nov 14, 2023 · 0 comments

Comments

@jokiefer
Copy link
Contributor

Status Quo

if a fes filter:

<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
 <ogc:And>
  <ogc:PropertyIsEqualTo>
   <ogc:PropertyName>Type</ogc:PropertyName>
   <ogc:Literal>dataset</ogc:Literal>
  </ogc:PropertyIsEqualTo>
  <ogc:PropertyIsLike wildCard="*" singleChar="_" escapeChar="/">
   <ogc:PropertyName>AnyText</ogc:PropertyName>
   <ogc:Literal>*potentielle Evapotranspiration*</ogc:Literal>
  </ogc:PropertyIsLike>
 </ogc:And>
</ogc:Filter>

is converted to a django filter, the like query will result in a exact lookup for *potentielle Evapotranspiration*

This is cause the current like function does not take into account the wildCard char. It will always use the hard coded % char as wildcard.

jokiefer added a commit to jokiefer/pygeofilter that referenced this issue Nov 15, 2023
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

No branches or pull requests

1 participant