https://bugs.kde.org/show_bug.cgi?id=457522
Natalie Clarius <natalie_clar...@yahoo.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |natalie_clar...@yahoo.de --- Comment #2 from Natalie Clarius <natalie_clar...@yahoo.de> --- I think the problem is that Baloo does not assign the file any category, and consequently it won't show up in the file search results that specifically query the individual categories in the code you linked to. Note the information in Terms: > $ touch myfile.foobar > $ balooshow -x myfile.foobar > 94995300010303 66307 9738579 yourfile.foobar [/home/natalie/myfile.foobar] > Mtime: 1660051514 2022-08-09T15:25:14 > Ctime: 1660051514 2022-08-09T15:25:14 > > Internal Info > Terms: Mapplication Moctet Mstream > File Name Terms: Ffoobar Fmyfile > XAttr Terms: As opposed to a .txt file: > $ touch theirfile.txt > $balooshow -x theirfile.txt > 94984b00010303 66307 9738315 test.foobar [/home/natalie/theirfile.txt] > Mtime: 1660050158 2022-08-09T15:02:38 > Ctime: 1660050158 2022-08-09T15:02:38 > > Internal Info > Terms: Mplain Mtext T5 T8 > File Name Terms: Ftheirfile Ftxt > XAttr Terms: "T5" and "T8" indicate categories Document and Text, see https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/types.h#L20. "Mplain" and "Mtext" indicate the mime type. > file --mime-type theirfile.txt > theirfile.txt text/plain When a file is created empty with an unknown file extension, it gets mime type "inode/x-empty": > $ file --mime-type myfile.foobar > myfile.foobar: inode/x-empty This does not get mapped to any category by Baloo: https://github.com/KDE/baloo/blob/509dcd8da6b2e21723838f27003ac72d9a267a1a/src/file/basicindexingjob.cpp#L63 When the file has text content, even with an unknown file extension, it gets mime type "text/plain": > $ echo "test" > myfile.foobar > $ file --mime-type myfile.foobar > myfile.foobar: text/plain But for some reason Baloo does not represent this in the term information, the *.foobar has mime type ("M") "application/octet/stream" and no categories ("T"), even if the file is created non-empty and has mime type text/plain to begin with. So something seems to go wrong already on the side of Baloo for not setting the terms information correctly. But independently of that, it may be useful to be able to also retrieve results that do not have any category. Either an additional query in the runner for Baloo results with empty type, if such a query is possible. Or by adding to Baloo a generic fallback type for any file that has not received any other type, and adding that in the runner. -- You are receiving this mail because: You are watching all bug changes.