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

Implement fuzzy string matching to get header suggestions #207

Open
ashitaprasad opened this issue Feb 26, 2024 · 6 comments · May be fixed by #380
Open

Implement fuzzy string matching to get header suggestions #207

ashitaprasad opened this issue Feb 26, 2024 · 6 comments · May be fixed by #380
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ashitaprasad
Copy link
Member

Tell us about the task you want to perform and are unable to do so because the feature is not available

Currently, header suggestions are a sequence of strings which contain the given substring with no logic implemented for ordering. Algorithms like fuzzy string search etc. can be used to provide the sequence of matching strings with the most relevant item at the top.

@ashitaprasad ashitaprasad added enhancement New feature or request good first issue Good for newcomers labels Feb 26, 2024
@BrawlerXull
Copy link
Contributor

BrawlerXull commented Feb 26, 2024

Screenshot 2024-02-27 at 12 19 27 AM Screenshot 2024-02-27 at 12 20 01 AM

Is behavior like this is expected?

@animator animator linked a pull request Feb 28, 2024 that will close this issue
5 tasks
@opxdelwin
Copy link
Contributor

Is this still being worked on?

@animator
Copy link
Member

This issue is still open to work on @opxdelwin
The issue with the closed PR was the accuracy of results. You can read the thread for more details.

@PratyushChauhan
Copy link

After reviewing the last PR I have added modifications to improve suggestions.

PratyushChauhan added a commit to PratyushChauhan/apidash that referenced this issue Apr 1, 2024
@PratyushChauhan
Copy link

PratyushChauhan commented Apr 6, 2024

@animator are these results good?

Before (no results due to typo):
image

After (using fuzzy match):
image

@PratyushChauhan
Copy link

@animator I worked on passing most of the test cases but there was 1 test case I could not get to pass, it is due to the nature of how fuzzy matching works.
We could make an exception for this one case.:

Testing getFuzzyHeaderSuggestions function Testing using 'x-' pattern
Expected: [
              'Access-Control-Max-Age',
              'Max-Forwards',
              'X-Api-Key',
              'X-Content-Type-Options',
              'X-CSRF-Token',
              'X-Forwarded-For',
              'X-Frame-Options',
              'X-Requested-With',
              'X-XSS-Protection'
            ]
    Actual: [
              'X-XSS-Protection',
              'X-Api-Key',
              'X-CSRF-Token',
              'X-Forwarded-For',
              'X-Frame-Options',
              'X-Requested-With',
              'X-Content-Type-Options',
              'Max-Forwards',
              'Expect',
              'Expires',
              'Access-Control-Max-Age'
            ]
     Which: at location [0] is 'X-XSS-Protection' instead of 'Access-Control-Max-Age'

@PratyushChauhan PratyushChauhan linked a pull request Apr 6, 2024 that will close this issue
5 tasks
PratyushChauhan added a commit to PratyushChauhan/apidash that referenced this issue Apr 7, 2024
PratyushChauhan added a commit to PratyushChauhan/apidash that referenced this issue Apr 14, 2024
PratyushChauhan added a commit to PratyushChauhan/apidash that referenced this issue Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
5 participants