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

Unified search - search in current app by default #24056

Open
andreas-p opened this issue Nov 11, 2020 · 24 comments
Open

Unified search - search in current app by default #24056

andreas-p opened this issue Nov 11, 2020 · 24 comments
Labels
1. to develop Accepted and waiting to be taken care of design Design, UI, UX, etc. enhancement feature: search good first issue Small tasks with clear documentation about how and in which place you need to fix things in.

Comments

@andreas-p
Copy link

As covered in #23835, searching for files may take a very long time, making file search quite unusable. But it also has the side effect, that searching for something else will create collateral damage by overwhelming the database with unnecessary, very expensive queries, which stack up with every new keystroke. While the tests in #23835 where performed with my test user, who has 4 shares to a very big storage, other users have an average of 25 shares, with 55 shares max. If that user types 5 keys in the search box, he will trigger 4x55 queries running 1.2s each...

As a quick fix, I removed SearchProvider registration for the files app.

Each search provider should be configurable (at least enable/disable systemwide)

@andreas-p andreas-p added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Nov 11, 2020
@ruedigerkupper
Copy link

ruedigerkupper commented Jun 5, 2021

I must say that I rarely (next to never) need or want "unified search". If I need to search for a contact, I go to the contacts app (and don't want to see files or events). If I search for an event in my calendar, I naturally open the calendar app and search for it (and don't want to see files, contacts, tasks or whatever).
In general, I always know what I'm searching for. I never open Nextcloud and say, "let's search for 'abc' and see what I get! Oh, there's a file. Oh, and there's a contact, too! How exciting!" This just does not happen. In my opinion, having search results displayed all over Nextcloud is a disadvantage, it makes searching much harder and much slower. It is a step back in productivity.
So, yes, it would be nice if I could just disable global search and go with local search as I expect searching to work.
I can imagine that global search could be a nice feature when searching from the "dashboard" app. This app is designed to gather results from all over Nextcloud. But "files" should search for files, "contacts" for contacts, "calendar" for events, "bookmarks" for bookmarks etc.

@ruedigerkupper
Copy link

ruedigerkupper commented Jun 5, 2021

After all, the aim of the search feature is to give the user what they're searching for, as fast as possible. So, if the user already knows what they're searching for, it is unreasonable to ignore this fact. It may be a good option being able to broaden the search later, if the searched item is not found. But starting with the broadest search possible is mostly not helpful.

@szaimen
Copy link
Contributor

szaimen commented Jul 7, 2021

cc @nextcloud/designers is this feasible and does it make sense?

@andreas-p
Copy link
Author

Actually, the the proposal was issued trying to make unified search usable again without dropping it rightaway, while I completely agree with @ruedigerkupper : I can't recall any incident that I ever wanted to use unified search in my life, neither on NC nor on Windows or MacOS. So I could live with dedicated search tools only quite fine as well. If they exist.

@jospoortvliet
Copy link
Member

jospoortvliet commented Jul 9, 2021

So isn't this already implemented? You can pick what you want to search for, and even use an easy keyword:
ezgif-6-84f14fbbedfc

I would love to see a full-screen search and all that, but if you want to search in files only - just type in:files searchterm and you get what you want...

adding an ability to disable search providers per user might be useful, I guess...

@andreas-p
Copy link
Author

See #23835 why I need to disable filesearch completely. I can't let this up to the user.

@ruedigerkupper
Copy link

So isn't this already implemented? You can pick what you want to search for, and even use an easy keyword:
ezgif-6-84f14fbbedfc

I would love to see a full-screen search and all that, but if you want to search in files only - just type in:files searchterm and you get what you want...

Right, so in the files app "in:files" should be the default, because I have already decided I am looking for files and stated rhat by going to the files app. Unspecific search may be a nice idea for the dashboard, but not dedicated apps.

@szaimen
Copy link
Contributor

szaimen commented Jul 9, 2021

Right, so in the files app "in:files" should be the default, because I have already decided I am looking for files and stated rhat by going to the files app. Unspecific search may be a nice idea for the dashboard, but not dedicated apps.

Sounds like a good proposal to me 👍
When clicking on the search bar, it could prefil in:appid by default and put the cursor behind that which would solve this issue.
(Exceptions I can think of would be the dashboard app (search in everything by default), users, settings and appstore because they are probably no apps?)

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap 20-feedback needs info labels Jul 9, 2021
@szaimen szaimen changed the title Make Unified Search configurable Unified search - search in current app by default Jul 9, 2021
@szaimen szaimen added good first issue Small tasks with clear documentation about how and in which place you need to fix things in. design Design, UI, UX, etc. labels Jul 9, 2021
@andreas-p

This comment has been minimized.

@szaimen

This comment has been minimized.

@andreas-p
Copy link
Author

The file search still performs a full table scan, which isn't going to work on big databases. I can allow searches in the current directory only (which already may contain some thousand files/directories).

@andreas-p
Copy link
Author

22.1 doesn't multiply queries by shares any more, which is a good thing. Still, it's unified search, when only local search is needed.

@marcelklehr
Copy link
Member

This is what most services do nowadays:

image

@R0Wi
Copy link
Member

R0Wi commented Sep 21, 2021

@jospoortvliet in my case i'm using the fulltextsearch app which provides a much quicker way to search for files and integrates in unified search, too. Of course you also need a lot more infrastructure but i think the admins who also installed this app would be happy to disable at least the files searchprovider. So if it's a desireable feature to disable/enable searchproviders globally i'd volunteer to create a pull requests for this 👍

@szaimen
Copy link
Contributor

szaimen commented Feb 3, 2022

Hey @juliushaertl and @ChristophWurst I'd like to tackle this. Could you please give me some code pointers where this needs to be implemented? Thanks! :)

@Spartachetto
Copy link

@szaimen take into account that possibly you'd better contact @Aeredren because he could be working on the same thing. For reference #29614 and https://help.nextcloud.com/t/looking-forward-to-develop-sorts-files-visualisation-improvement-and-filters/128314 .

@szaimen
Copy link
Contributor

szaimen commented Feb 7, 2022

@Aeredren how far did you get with this until now? Is this issue (searchnng in the current app by default) something that you've already implemented in the planned enhancements?

@Aeredren
Copy link

Aeredren commented Feb 8, 2022

Hi @szaimen , I did not tackle the issue of "unified search" vs "search in current app", because I was focusing on search modal (filters) for files. (which does not use search provider but OCP\Files\Search)
Once upon a time I was planning to look into it but my time runs short so feel free to work on it :)

@szaimen
Copy link
Contributor

szaimen commented Feb 9, 2022

@kyteinsky
Copy link
Contributor

@szaimen Is it up for grabs?

@szaimen
Copy link
Contributor

szaimen commented Aug 29, 2023

@szaimen Is it up for grabs?

yes it is. Feel free to work on it :)

@kyteinsky
Copy link
Contributor

dropping this since it would be worked on here: #39162

@pjrobertson
Copy link
Contributor

The new unified search in NC 28 (see #39162) is a HUGE improvement! However, it still searches ALL apps by default as opposed to the current app. I agree that searching current app would still be the preferred option.

The reddit example in the comment above is a good example, as is GitHub:

Screen Region 2023-12-22 at 17 56 43

For the new unified search, I think it would look something like what was originally posted by marcoambrosini here: #39162 (comment)

@szaimen
Copy link
Contributor

szaimen commented Jan 2, 2024

There was a PR by @marcoambrosini which would be a big improvement IMO :)
#41609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of design Design, UI, UX, etc. enhancement feature: search good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Projects
None yet
Development

No branches or pull requests