geopython / geopython/pygeofilter

django like filter wont work for various wildcard chars

Open
#80 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
90
Forks
44
PR merge metrics
No merged PRs in 30d

Description

# Status Quo
if a fes filter:
```xml



Type
dataset


AnyText
*potentielle Evapotranspiration*

```

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

This is cause the current [like](https://github.com/geopython/pygeofilter/blob/9a2d0ea43ad15032cbe92208612cb5a5ffb990a9/pygeofilter/backends/django/filters.py#L167) function does not take into account the `wildCard` char. It will always use the hard coded `%` char as wildcard.

Contributor guide

Open the contributing guide

Research direction

Start in pygeofilter/backends/django/filters.py at the like function linked in the issue, then reproduce the provided OGC Filter conversion. Verify that the wildCard, singleChar, and escapeChar values from PropertyIsLike are honored instead of treating the pattern as an exact lookup; the issue is done when the shown query matches the intended text.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.