Search should find only matching items #12590
-
Initially posted here: Earlier (at least in 2022.4) the search feature worked as per this method: Now (2022.5) the output results may contain not only exactly matching items but similar items too. Probably (just my guess) these changes were added with a new search feature. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 44 replies
-
@farzher it would be great if you could take a look at this please, i see you're the developer of fuzzysort :) @vanackej is the one who implemented the library in this commit 8da73d4 |
Beta Was this translation helpful? Give feedback.
-
@zsarnett Feedbacks on the new entity picker behavior seems globally negative.
|
Beta Was this translation helpful? Give feedback.
-
I don't know what to think, so many options/opinions here :-) My simple initial intention, as an end user, is to make the entity search a little more functionnal for this simple (and I think very frequent) use case:
=> I just want to type "temp" to filter temperature sensors, and then "roomX" to filter on the location Another example : I want one of my hvac units total consumption entity. Just want to type, in any order, the words "consumption roomName total" to get it. I'm not sure having advanced search mode/switching between search mode with checkboxes would be really that usefull, and it would add a lot of complexity in the user interface and underlying code |
Beta Was this translation helpful? Give feedback.
-
Hi @farzher Thanks for the insight into the Algorithm from FuzzySort! I do think we can continue to utilize this algorithm with a few tweaks to some of the scorings. This is possible using your currently extendable options. I will discuss with @vanackej who created the original PRs for this and find a better method. I do think if the filter string is included in one of the strings in the list then we should return that to the top of the list. So we can do something where we remove those from the fuzzy sort options, before filtering them using our own method or possibly updating the scoring option. I haven't fully dived into this yet but we will make the change for the next release for sure Thanks to everyone who has been discussing this and giving feedback! |
Beta Was this translation helpful? Give feedback.
-
Just jumping in as I had opened another issue on this same topic here home-assistant/core#71435 I hope this can be fixed in an upcoming release because the search function as it is is barely usable. |
Beta Was this translation helpful? Give feedback.
Hi @farzher
Thanks for the insight into the Algorithm from FuzzySort! I do think we can continue to utilize this algorithm with a few tweaks to some of the scorings. This is possible using your currently extendable options.
I will discuss with @vanackej who created the original PRs for this and find a better method. I do think if the filter string is included in one of the strings in the list then we should return that to the top of the list.
So we can do something where we remove those from the fuzzy sort options, before filtering them using our own method or possibly updating the scoring option. I haven't fully dived into this yet but we will make the change for the next release for sure
…