server icon indicating copy to clipboard operation
server copied to clipboard

Trigger search with 1 character or more

Open mjanssens opened this issue 8 years ago • 9 comments

As I understand the current search behavior in the files app is as follows:

  • typing first 2 characters in the search field filters all files and folders in the current view, not recursive.
  • typing 3 or more characters in the search field filters the same as above and additionally the files and folders recursively.

Sometimes i need to find a file e.g. "CV name.doc" which is in one of the sub folders and when typing the first 2 characters i get no results. Only when typing a space behind the 2 characters the file appears. But than i would have to know for sure that the third character was a space, and not an underscore or another symbol. On file systems people would use wildcards, but that doesn't work here.

Would it be wise to give an extra option next to the search field to search in sub folders? Maybe a small button that is deselected by default.

It seems that the current behavior is a at a sweet spot between speed and functionality. But there a cases when you need the recursive search at 2 characters. I wonder how other people work around it now.

Currently on Nextcloud version 12.0.4

mjanssens avatar Dec 06 '17 23:12 mjanssens

cc @nextcloud/designers

Maybe enforce the search by pressing enter? I am against an option for the search

MorrisJobke avatar Dec 14 '17 14:12 MorrisJobke

Agree there should not be an option.

Needing to type 2 characters seems not instant enough. Can we reduce it to 1 char for current folder and 2 for recursive? (I know 1 char for recursive would be too resource-intensive.)

jancborchardt avatar Dec 14 '17 14:12 jancborchardt

I understand that an extra option is not desirable, it keeps the interface clean. Suggestion by MorrisJobke is indeed what would solve these search cases. I'm not sure though if it is important enough to implement. Has no other user (in large environments) mentioned this?

mjanssens avatar Dec 15 '17 11:12 mjanssens

Agree there should not be an option.

Needing to type 2 characters seems not instant enough. Can we reduce it to 1 char for current folder and 2 for recursive? (I know 1 char for recursive would be too resource-intensive.)

What shall we do then now @jancborchardt ? :)

skjnldsv avatar Aug 20 '20 13:08 skjnldsv

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar Sep 19 '20 13:09 ghost

@mjanssens please do not remove the labels. We're missing Jan's input, the issue is stale

skjnldsv avatar Sep 29 '20 10:09 skjnldsv

@skjnldsv OK, sorry

mjanssens avatar Sep 29 '20 11:09 mjanssens

Ideally we always already start searching with 1 character put in only. :)

jancborchardt avatar Sep 29 '20 16:09 jancborchardt

Ideally we always already start searching with 1 character put in only. :)

If one used the FTS capabilities of SQLite, MariaDB/MySQL, and PostgreSQL to search specific fields, instead of a LIKE query, then it would be possible and very quick, plus very quick to search for however many result out of perhaps any number of files.

See here for a basic example: https://youtu.be/7tffuHLCXn8

gennaios avatar Jun 21 '23 08:06 gennaios