icones
icones copied to clipboard
Search syntax documentation
Clear and concise description of the problem
#85 added advanced search syntax powered by fzf, but it is not documented anywhere, thus probably little-known.
With recent updates, searching icons (especially all icons) becomes less intuitive:

To get results comparable to the official Iconify website, one needs to use special syntax like 'heart 'fire
:

Suggested solution
Ideally there should be a section/page mentioning how you can use advanced syntax to narrow search results.
Alternative
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Yeah sure, PR welcome
Wow this would be great. I'm glad I saw this issue. The current search is ridiculous.
Searching Solar for "trash" gives you bandages, dumbbells, underwear, phones, bedside tables, lots of arrows, a ladle? and a bunch of other things that don't make sense.
If you search All for "add bullet" there's a bunch of arrows, people playing basketball ... 90% of these results don't seem related to the query at all. It's wild.
Edit: It looks like if you search All collections for 'table
it matches everything from the Tabler collection because those icon names begin with the "tabler:" prefix? (Can get away with searching table$
or 'table:
instead...)
might i suggest switching from fzf to something much faster and much less :exploding_head: ?
https://github.com/leeoniya/uFuzzy#a-biased-appraisal-of-similar-work
vs fzf-for-js: https://leeoniya.github.io/uFuzzy/demos/compare.html?libs=uFuzzy,fzf-for-js&search=super%20ma
(happy to help out if interested)
EDIT:
out of curiosity, i created a full list of all ~205k current icons and aliases from @iconify/json
[1]: icons.zip. you can drag-drop this into the yellow box of the demo link above. e.g. with typo tolerance and out-of-order terms:
[1] https://www.npmjs.com/package/@iconify/json
When I am typing the "cat", I hope the cat can priority display. Can it add the sort function to rearrange the search result? I found Fzf can take tiebreakers: [ byLengthAsc ]
to decide sort order.