Can't search by attachment's filename. Or am I just stupid?

Hello,

I am experiencing an issue where I cannot find tickets by searching for a string that is only present in an attachment’s filename. However, searching for text within the file content works correctly. I have already run “zammad run rake zammad:searchindex:rebuild”, but it did not resolve the issue.

Infos:

  • Used Zammad version: 7.0.0-1772726494.13e12b47.jammy
  • Used Zammad installation type: package
  • Operating system: Ubuntu 22.04.5 LTS
  • Browser + version: Edge 147.0.3912.86

Expected behavior:

  • I can find the ticket by searching for the file name.

Actual behavior:

I can’t find any tickets when I search for the name of an attachment. (Picture 2 & 3)
But when I search for a string that’s in the attachment, I find the ticket. (Picture 4)

Steps to reproduce the behavior:

Create a ticket and attach a file where the filename contains a string that is not present within the file’s content.

Pictures

Picture 1


Picture 2

Picture 3

Picture 4

Picture 5

you’re not stupid, and zammad run rake zammad:searchindex:rebuild is probably not the right fix here.

I just verified this on a preproduction Zammad 7.0.1 package install:

  • a unique token from the attachment content is searchable
  • a unique token from the attachment filename stem is also searchable
  • but the full filename including the extension was not searchable in my test

Example from my check:

  • attachment filename: ATTACHFN177784196994ef2c.txt
  • search for ATTACHFN177784196994ef2c → hit
  • search for ATTACHFN177784196994ef2c.txt → no hit

So this looks less like “attachments filenames are completely unsupported” and more like a search/analyzer limitation or bug around how filenames are indexed and queried.

In other words: if your search term includes punctuation like the dot before the extension, or if you are searching for only a fragment of the filename, Zammad/Elasticsearch may not match it the way you expect.

For me personally, this is not an issue, but if you want to help move this forward, I think this is worth turning into a proper bug report if you have the time and skill to do it.