gawells writes
Hi
I’ve compiled and installed recoll with --enable-xattr and created the following "fields" file in /.recoll:
[prefixes]
tag = XT
[stored]
tag=
[xattrtofields]
user.tag = tag
As a test I created I file using the user.tag attribute (ext4 filesystem):
setfattr -n user.tag -v orangefish xattr.test
However I can’t find it when searching with "tag:orangefish" or in advanced search either ("tag" is listed, however). Is there something I still need to do to make this work?
medoc writes
Hi,
There are 2 issues with your "fields" file, and I had a hard time finding them …
This should be better documented, but few people use the xattr feature, I think mainly because user xattrs are difficult to use in general because of bad support from most utilities.
Anyway please try to:
-
Use the simple tag name in the "xattrtofields" section on the left side of the assignment, not "user.xxx"
-
Not use "tag" as a recoll field name because it is listed as an alias for "keywords" somewhere else in the standard "fields" file (I had a really hard time with this one, just couldn’t see what was happening).
So something like the following should work:
[prefixes]
mytag = XT
[stored]
mytag=
[xattrstofields]
tag=mytag
Please let me know how this works for you, it seems to work ok for me, if this is a success, I’ll improve the documentation.
Cheers,
jf
medoc writes
Ok, I tried to edit the previous comment but bitbucket ate my changes along with all the paragraphs. Here I come again:
Hi,
There are 2 issues with your "fields" file, and I had a hard time finding them ...
This should be better documented, but few people use the xattr feature, I think mainly because user xattrs are difficult to use in general because of bad support from most utilities.
Anyway please try to:
-
Use the simple tag name in the "xattrtofields" section on the left side of the assignment, not "user.xxx"
-
Not use "tag" as a recoll field name because it is listed as an alias for "keywords" somewhere else in the standard "fields" file (I had a really hard time with this one, just couldn’t see what was happening).
So something like the following should work:
[prefixes]
mytag = XT
[stored]
mytag=
[xattrstofields]
tag=mytag
Also, ".test" is not a recognized suffix, so recoll will rely on "file -i" output which is sometimes less than reliable, please rather use ".txt".
Please let me know how this works for you, it seems to work ok for me. If this is a success, I'll improve the documentation.
Cheers,
jf
gawells writes
Hi
Thanks! That seems to work. I’ve been thinking it would useful to do a desktop search with user defined tags. So far this is the only solution I’ve found. I guess simply being able to search for the presence of tags would work too, but this should get me started :)
cheers Gordon
medoc writes
Not to recommend a "competitor", but wasn’t user tagging one of the strong points and motivation of the Tracker Gnome project? Not that I have followed this closely actually, but I am surprised.
Glad it worked anyway
Cheers
jf
gawells writes
Thanks
Will take a look, although I don’t use gnome much. If tags can migrate with files during copies and moves that would be good.
g