Skip to content

Conversation

@alswl
Copy link

@alswl alswl commented Jun 29, 2023

related to #6

Now we cant match any partial words in query.
The new partial search pattern is works like Jetbrains matching in UI.

Copy link
Owner

@artemy artemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change, would you be able to add a new testcase that checks this matching?

@alswl
Copy link
Author

alswl commented Jun 29, 2023

@artemy unit tests added.

@alswl
Copy link
Author

alswl commented Jul 15, 2023

@artemy Hello, any progress? or should I do anything else?

@artemy
Copy link
Owner

artemy commented Aug 9, 2023

@artemy Hello, any progress? or should I do anything else?

@alswl
Sorry for late reply.
There is still one comment I posted that is not yet addressed in your changes

@alswl
Copy link
Author

alswl commented Sep 24, 2023

@artemy Hi, I think the test cases are added, and I cannot found the one comment in the file changes. Could your point the comment to me? thanks.

@artemy
Copy link
Owner

artemy commented Sep 25, 2023

@artemy Hi, I think the test cases are added, and I cannot found the one comment in the file changes. Could your point the comment to me? thanks.

I've tagged you in the pending comment

@alswl
Copy link
Author

alswl commented Sep 25, 2023

@artemy I'm confused, I cannot find any comment in the files changes.

image

image


def match_fuzzy(chars, string):
index = 0
for char in chars:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after having a second look at this, I believe this algorithm is too permissive. For example, it would find my-awesome-project by querying with ywp. I'd like to keep matching by first letters of each word in the name

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alswl this comment is still not addressed I believe

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alswl tagging you in the pending comment

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the search algorithm is by design. Maybe I can make it more strict: only match the left letters of eatch word. For eg: my-awesome-projct will matching the patterns:

  • map -> yes
  • myawp -> yes
  • mawpr -> yes
  • awp -> yes
  • mwr -> no
  • ywp -> no

What's your opinion?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what I had in mind, yes! Please make sure to extend the unit tests to cover these new cases

@artemy
Copy link
Owner

artemy commented Sep 25, 2023

@artemy I'm confused, I cannot find any comment in the files changes.

image

image

ok sorry, my bad. Forgot to press "submit" on the review :O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants