Skip to content

preset search - match when preset text is in term#12159

Merged
tyrasd merged 2 commits into
openstreetmap:developfrom
matkoniecz:search
Apr 21, 2026
Merged

preset search - match when preset text is in term#12159
tyrasd merged 2 commits into
openstreetmap:developfrom
matkoniecz:search

Conversation

@matkoniecz

Copy link
Copy Markdown
Contributor

currently only when search terms are within preset text or text is close then matches are found

as result for example "private swimming pool" was not matching "swimming pool preset"

fixes #9105

Though it looks like sorting may be needed?

screen-2026-04-01-21-13-58

currently only when search terms are within preset text or text is close then matches are found

as result for example "private swimming pool" was not matching "swimming pool preset"

fixes openstreetmap#9105
@matkoniecz

Copy link
Copy Markdown
Contributor Author

note: it may end adding some extra irrelevant or bizarre matches, but putting them at the end of list seems better than failing to match anything

@matkoniecz

Copy link
Copy Markdown
Contributor Author

I also though about splitting search term and doing word-by-word search, like

    if (value.includes(' ')) {
      const words = value.split(' ').filter(Boolean);
      const perWordResults = words.map(word => _this.search(word, null, loc).collection);
    }

@tyrasd tyrasd merged commit 81e9c5d into openstreetmap:develop Apr 21, 2026
3 checks passed
tyrasd added a commit that referenced this pull request Apr 21, 2026
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.

"private swimming pool" is not finding anything, even "swimming pool" preset

2 participants