Can someone please tell me why the result of this query returns zero results I´m trying to understand attributes features and tools to use them. Thanks in advance.
And by the way, ask why the value “8” does not appear on the column of the attribute in Tracker? Thanks.
I think queries are case sensitive (Nota vs nota), I might be wrong though.
Already tested before posting and same result. Thanks but i think theres a problem with Tracker/Attributes not showing proper information like tools ( listattr, catattr and so on ). Anyway
Let me know if i´m wrong. Thanks.
Mimetype attributes have separate presentation and internal names. Tracker displays the pretty name, but the internal name is what counts.
Your screenshot doesn’t show what internal name your attribute was given, but I’m guessing you chose “Nota”, which is why you don’t get any visible results when adding lower-case “nota” attributes. They’re not the same.
The fact that you can add the “wrong” attribute doesn’t mean anything. The attributes of the mimetype and the actual attributes on your files are not connected that way. The attributes added to mimetypes in the FileTypes preferences is more of an aid for Tracker (and other interested apps) than anything else, IIRC.
Thanks for replying. I see it more clear. The problema was different names misleading me. Internal one and Attribute name. Anyway what i undertand is that only mkindex tool can make one attribute indexable ( even if u can add attributes and values without using it first but wont be searchable till reindex is used ). And FileTypes is only used to get access in Tracker or whatever program to make that column/info/value visible and available for the user. In any case the Internal name of the attribute is what is going to be displayed by FileTypes so its a good idea it matches the name in both places?. Excuse me, i´m a bit lost yet
One more question missing. What do i have to do in FileTypes if i want to define a global indexable attribute with mkindex and want that attribute visible for all files in Tracker? in wich category should add it? Thanks.
Hi Haikurocks!
Did you check out the workshop in the user guide?
You can add any attribute to any file, so it doesn’t matter that much to which filetype you add/define it in the FileTypes preferences. The internal name of the attribute doesn’t matter either AFAIK. I’d go with “META:your-new-attribute-name” for a general attribute. Also, the internal name should probably not be localized; you can do that with the “external” attribute name.
For your example, maybe what you need is already available. Check out the audio files’ attribute “MEDIA:rating”.
In any case, you should make sure to first add your attribute to the index with “mkindex META:your-new-attribute-name” before adding it to any files. Then you don’t have to use “reindex”. Note that the index is per volume, i.e. you have to do the “mkindex” for all partitions that may need it.
HTH
Humdinger
I strongly suggest going through the workshop, as suggested by Humdinger.
I don’t think what you’re asking for is possible at the moment. There is no way to make Tracker show a certain attribute, globally for all types, other than going over each and every type and adding the same attribute.
If you did go through all that trouble, Tracker will still not show this attribute as part of the top level ones (Name, Size, Kind and friends) but show it as part of the individual file type attributes, i.e. in a submenu.
The closest thing to a catch-all filetype, in MIME terms, is the mimetype “application/octet-stream” (presented as “Generic file” in Haiku), but from FileTypes’ perspective, and Tracker’s perspective, this type is just like any other type. It’s attributes show up in a submenu rather than at the top level.
If you set up a pseudo-global attribute like that, with the same internal attribute name and the same attribute type, on every file type, the on-disk attribute of all your different files would be one and the same kind, as it is the attribute name, the “internal” one (and its type) that matters from the filesystems point of view.
The attribute has no actual connection to the file type on the filesystem/storage level of things. If you have set up indexing of this attribute, there will be only one single index (per fs volume) for all files carrying that attribute.
Presentation and storage are pretty much independent of each other. Attribute indexing is on the storage side of things. It happens within the filesystem itself, and is unrelated to file type and file content. It only cares about attribute name, attribute type and attribute content.
(BTW, if you’re using the package management branch of Haiku, there might be new quirks/bugs in the FileTypes preferences, which will be fixed once the PM branch gets more exposure.)
Thanks to both of you, things are much clearer now with your explanations. I already did the workshop but didnt find some answers in the guide. Thanks again. By the way if i can give my oppinion a beta sounds better than another alpha ;).