Re: [Tracker] Example of how to filter tracker-tag searches
- From: Martyn Russell <martyn lanedo com>
- To: Douglas Macdonald <dug armadale gmail com>
- Cc: tracker-list gnome org
- Subject: Re: [Tracker] Example of how to filter tracker-tag searches
- Date: Mon, 25 Mar 2013 15:06:36 +0000
On 22/03/13 15:18, Douglas Macdonald wrote:
Hello,
Hello Douglas,
Thank you for 'tracker'.
I am having a little trouble understanding the manual page for the
'tracker-tag'.
I can not figure how to filter/combine tag searches and the use of:
" -r, --or-operator
Use OR for search terms instead of AND (the default)"
Could someone please point me to a little example?
You're right, this is ambiguous. I've fixed this in the tracker-0.16
branch and will push to master too. See:
https://git.gnome.org/browse/tracker/commit/?h=tracker-0.16&id=dc70a210b5f81475055b6e2f350fd10fee1a3953
I am trying to do something like
tracker-tag -t tag1 [AND] tag2 ...
tracker-tag tag1 [OR] tag2 ...
The issue here is, logical AND is not possible. The "tag" being
specified in this case is the label for the tag. Tags don't have
multiple labels. The only thing that can have multiple labels (and by
extension, tags) is files. So by specifying AND operations (or the
default until I fixed it), was looking for all tags which had the label
"foo" and "bar", which is always going to result in nothing returned.
What you really want is logical OR, i.e. list all tags matching "foo OR
bar OR baz". I've fixed the documentation and implementation to make
sure this is the case now. Without updating, you can do this with
tracker-tag -t -r tag1 tag2 ...
--
Regards,
Martyn
Founder and CEO of Lanedo GmbH.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]