#948  Optimizing Search Results switching queries to case-insensitive matching
Released
crash opened 1 year ago

Hey there, I did notice that search on projects most of the time fails to give me optimal results. That’s because two reasons:

  1. Letter case, i think that going case-insensitive instead of case-sensitive is the way to be here

  2. Two (or even more) words queries, maybe I’m missing how to do it, but searching for two terms could be very useful, especially in a large codebase

OneDev changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
OneDev commented 1 year ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 1 year ago
Previous Value Current Value
Closed
Released
OneDev commented 1 year ago

State changed as build #3045 is successful

crash commented 1 year ago

Hi and thank you for the instant handling time, as always!

Trying to checking the fixing commit I see that you did enable case insensitive queries but not multiple terms (two words), correct?

Robin Shen commented 1 year ago

Multi term query is supported for fuzzy query. For instance if you query for "onedev server", it will be converted to path pattern **/*onedev*/**/*server*/** automatically. For explicit path criteria query ('Path' is '...'), you should use wildcard chars for missing segments though.

crash commented 1 year ago

Ok so, thanks to your hint I’ve figured out how to perform “ordered” multi term searches using the *, I’m going to write it here for the convenience of all users:

For instance, this query: https://code.onedev.io/projects?query=canno+project (canno project with the space) doesn’t produce any match

but this query: https://code.onedev.io/projects?query=canno*project (canno*project with the explicit * wildcard instead of space) does the job

I say “ordered” because the wildcard workaround isn’t a full replacement for “& search operator” therefore order of search terms matters, then in our example https://code.onedev.io/projects?query=project*canno doesn’t produce the match

the search experience isn’t the best, but now that it’s case-insensitive is more than acceptable

thank you so much!

Robin Shen commented 1 year ago

Thanks for the suggestion. Will make this improvement in next patch release.

Robin Shen changed state to 'Open' 1 year ago
Previous Value Current Value
Released
Open
OneDev changed state to 'Closed' 1 year ago
Previous Value Current Value
Open
Closed
OneDev commented 1 year ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 1 year ago
Previous Value Current Value
Closed
Released
OneDev commented 1 year ago

State changed as build #3052 is successful

crash commented 1 year ago

… and now we have a top-notch search :)

I can confirm everything works as expected, thank you Robin!

Robin Shen commented 1 year ago

Thank you for all the suggestion. Really appreciated!

issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Issue Votes (0)
Watchers (3)
Reference
onedev/server#948
Please wait...
Page is in error, reload to recover