Skip to content

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

Open
matkoniecz wants to merge 1 commit intoopenstreetmap:developfrom
matkoniecz:search
Open

preset search - match when preset text is in term#12159
matkoniecz wants to merge 1 commit intoopenstreetmap: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);
    }

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

1 participant