Projects onedev server Issues #948
#948  Optimizing Search Results switching queries to case-insensitive matching
Released
crash opened 2 months 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' 2 months ago
Previous Value Current Value
Open
Closed
OneDev commented 2 months ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 months ago
Previous Value Current Value
Closed
Released
OneDev commented 2 months ago

State changed as build #3045 (7.7.1) is successful

crash commented 2 months 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 2 months 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 2 months 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 2 months ago

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

Robin Shen changed state to 'Open' 2 months ago
Previous Value Current Value
Released
Open
OneDev changed state to 'Closed' 2 months ago
Previous Value Current Value
Open
Closed
OneDev commented 2 months ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 months ago
Previous Value Current Value
Closed
Released
OneDev commented 2 months ago

State changed as build #3052 (7.7.2) is successful

crash commented 2 months ago

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

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

Robin Shen commented 2 months ago

Thank you for all the suggestion. Really appreciated!

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