Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaler search is not returning results correctly #857

Closed
tomkerkhove opened this issue Aug 3, 2022 · 10 comments · Fixed by #875
Closed

Scaler search is not returning results correctly #857

tomkerkhove opened this issue Aug 3, 2022 · 10 comments · Fixed by #875
Labels
bug Something isn't working

Comments

@tomkerkhove
Copy link
Member

The search on scaler page does not show results when using "Azure"/"AWS"/"Redis" after #805

Expected Behavior

Show "Azure Service Bus" and others when searching for "Azure"; for example.

Actual Behavior

No results were found

Steps to Reproduce the Problem

  1. Search for "Azure", "AWS" or ""Redis" on the scaler page
@chalin
Copy link
Contributor

chalin commented Aug 4, 2022

@thisisobate - I think that the "wild card" feature should be dropped. It seems unconventional for a search. Implicitly, when a user types "abc" the search should be for any match containing "abc".

Do you agree @tomkerkhove? If you agree, please assign this to @thisisobate.

@chalin
Copy link
Contributor

chalin commented Aug 4, 2022

/cc @nate-double-u

@tomkerkhove
Copy link
Member Author

Agreed!

@chalin
Copy link
Contributor

chalin commented Aug 4, 2022

Please assign to @thisisobate.

@thisisobate
Copy link
Contributor

@chalin You're right. Implicitly, when a user types "abc" the search should be for any match containing "abc". The tricky thing is that for Lunr, it can only match a word (term) not characters.

E.g, we want to search for scalers that are maintained by Microsoft. We start by entering the "m" character, then "i".
We expect the tool to be smart enough to depict that we mean Microsoft but in reality, it doesn't. This is where the wildcard search comes in.

If we should drop the wildcard search, then it means the user can only receieve results that match exactly with the search query. What this means is the search query must match at least one word in the index/record/database. Inotherwords, If I search for "Microsoft", it should return every record that contains Microsoft and nothing else.

@tomkerkhove

@chalin
Copy link
Contributor

chalin commented Aug 4, 2022

The tricky thing is that for Lunr, it can only match a word (term) not characters.

IMHO, then either we shouldn't be using Lunr, or we need to make the necessary adjustments so that we can search for an arbitrary string being contained in the search targets.

@thisisobate
Copy link
Contributor

thisisobate commented Aug 4, 2022

we need to make the necessary adjustments so that we can search for an arbitrary string being contained in the search targets

Sure...that's what I tried doing with the wildcard thing. Anyways, I've started working on this issue so @tomkerkhove feel free to assign me

@chalin
Copy link
Contributor

chalin commented Aug 4, 2022

Come to think of it ... why not use the user's filter-string input of, say abc ... def, internally as *abc ... def* when conducting the search?

@thisisobate
Copy link
Contributor

thisisobate commented Aug 4, 2022

That could work...would try this approach and see if it satisfies all the edge cases.
Thanks for the suggestion!

@thisisobate
Copy link
Contributor

*abc ... def* didn't work for me. I figured I needed to improve the search logic to support both word and character matching. Would push something right away.

Repository owner moved this from Todo to Done in Documentation Improvements Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants