Searching files by name does not get all results

Nextcloud version (eg, 12.0.2): 17.0.0
Operating system and version (eg, Ubuntu 17.04): CentOS 7, NC running in Docker
Apache or nginx version (eg, Apache 2.4.25): Docker: nextcloud:fpm-alpine
PHP version (eg, 7.1): 7.3.10

The issue you are facing:
I’m trying to find files by name. Most of my files (jpg, pdf, …) have a standard pattern for the file name: year-month-day_topic_info_foobar.pdf, for example:
2019-09-10_Amazon_Invoice_123456.pdf
2019-10-13_Vacation_Photo_0132.jpg

Now, when I type for example ‘Amazon’ into the search field, I will get no results. It does not make a difference, wether I search from the root folder or from the actual folder containing this file. However, if I start typing: ‘2019-09-10_Amazon’ the file can be found.

So, basically, if I search for anything other than the complete file name (from the beginning), the search finds nothing. With one strange exception:
Some photos are still named ‘photo_year-month-day_whatever.jpg’ and when I type the date first, those files do match the search, even though the date is in the middle of the filename.

Is this the first time you’ve seen this error? (Y/N):
Not sure, this is the first time I actually tried it.

This is happening with the Android app as well as in the browser. Is this actually intended behaviour or do I have to configure some indexer options? Having to know the exact file name to find a file makes search somewhat useless…

Any help is appreciated.

Hi,

I was curious and tried myself. Very strange thing: the first attempts I saw the same issue, which you describe. And I tried and repeated over and over again and suddenly it worked. Also today (one day later) the search works as expected.
I know, sounds too strange to be true and I have no real explanation for that. Anyway: could you try that, too, maybe? I simply tried different parts of the file, like first 1, 2, 3 letters, file extension (pdf, jpg) and then the chars from the middle.

Hi,

thanks for trying this out.

I tried multiple times just now, and what I found is, that I can find those files if I use exactly one search term.

To use my example from above: I will find 2019-09-10_Amazon_Invoice_123456.pdf everytime I search for ‘Amazon’ OR ‘Invoice’, but I find nothing when I search for ‘amazon invoice’.

It seems like I tried only multiple search terms until now. It works for single search terms on Android and on the Web UI.

Unfortunately, finding the correct file with only a single search term seems pretty improbable :slight_smile: