Fuzzy search gives rather wrong results in entity picker #17474
Replies: 6 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
Ahh that explains it... the ones that are appearing when you query "sun." do have dots in their names (specifically the three 3.3V ones): All of the following match fuzzy search because of the dots: IIYAMA ASUS P8Z68-V PRO Nuvoton NCT6776F Voltages Analog +3.3V IIYAMA ASUS P8Z68-V PRO Nuvoton NCT6776F Voltages +3.3V IIYAMA ASUS P8Z68-V PRO Nuvoton NCT6776F Voltages Standby +3.3V The fuzzy search utility, as implemented by Home Assistant, allows any number of other characters between the matching ones. The only real criteria is that all of the characters in the query string exist, in order in the target. There are other algorithms that take proximity into account in the scoring, but that isn't how the pre-existing filter/sort used by HA is configured. BTW, not like it helps, but I didn't code the fuzzy search at all. It already existed and was used in other parts of the UI, just not the "picker" components yet. I do agree that some type of closeness setting would be ideal, but @karwosts indicated such a setting would likely not fly with the lead devs. I'd try looking into adding that, but am not very familiar with any of the settings persistence aspects of HA, and given the low likelihood of being merged, would be a somewhat large time-sink. Perhaps someone more well-versed could take a look though? |
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
Winamp had the perfect search decades ago, I don't understand why nowadays this seems to be such a hard problem. Split the search term at whitespace into parts, then show all items that contain all the parts, anywhere in any of their labels, keeping whatever sort order the items have. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After adding a fuzzy search logic into entity picker, it gives lots of wrong results.
Here is an example - other 3 entities have maximum "
su
" substring:I can understand intentions of people who asked about adding this fuzzy logic, but the current implementation gives rather wrong results.
Beta Was this translation helpful? Give feedback.
All reactions