Closed DinMon closed 3 weeks ago
Hi @DinMon , thank you for the Issue. Regarding trailing spaces related issues, I have tried this before, and at that time I came to the conclusion that Powertoys Run had removed trailing spaces when it passed the user's input to me, and I had no way of knowing whether or not the user had typed a space after the last letter.
But regarding Scenario 1 you mentioned, do you think we should only show the corresponding search engine when the user inputs a word that exactly matches a search engine, instead of matching all search engines normally? I think this is achievable.
Hi @Daydreamer-riri, I think it will be good to use StartWith in GetRecords(string query)
in Storage.cs
instead of Contains. Yeah coming back to your question, in my opnion, you don't need to see Perplexity because it contains 'y' keywords in it but rather the options that the query start with.
/
I think it will be good to use StartWith in
GetRecords(string query)
inStorage.cs
instead of Contains.
In most search scenarios, the search behavior is Contains
. For example, in everything, or file search in vscode. Sometimes I don't remember the exact spelling of the target, but I remember a few letters, which can help me find it.
For cases of exact match, I think it might be better to prioritize the exact match results to the highest weight and make them the first item.
Yes, I think changing the weight is a good way to resolve the issue.
When using the search functionality in the PowerToys Run WebSearchShortcut repository, there is an inconsistency in how search engines are returned based on user input. The expected behavior is that when a user specifies a key letter followed by a space, only the corresponding search engine should be returned. However, the current implementation does not adhere to this logic. Below are the scenarios illustrating the issue, along with the configuration of the search engines:
Search Engine Configuration:
Scenarios Illustrating the Issue:
Scenario 1:
s; y
s; y
Scenario 2:
s; y
(with a space aftery
)s; y
Scenario 3:
s; y {query}
s; y {query}
Original Code Snippet:
Summary of the Issue:
The search functionality currently returns multiple search engines when a key letter is followed by a space. For example, typing
s; y
ors; y
should return only "YouTube," but it also returns "Perplexity." This inconsistency is confusing. The expected behavior in my opnion is that any input with a key letter followed by a space should yield only the corresponding search engine.