diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-11 16:27:27 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-11 16:27:27 -0400 |
commit | f963aca3981dca57bde7b25403b13e413be4f28a (patch) | |
tree | d5d77ade3421e07069c0507dd4b9632f5a79c5d1 /doc | |
parent | 64da213d6582130255d7b3016269065856ca1e1e (diff) |
unify fields and tags
Diffstat (limited to 'doc')
-rw-r--r-- | doc/design/metadata.mdwn | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/doc/design/metadata.mdwn b/doc/design/metadata.mdwn index 2d20971d9..6b8b5bdc0 100644 --- a/doc/design/metadata.mdwn +++ b/doc/design/metadata.mdwn @@ -2,16 +2,14 @@ # metadata -Attach an arbitrary set of metadata to a key. +Attach an arbitrary set of metadata to a key. This consists of any number +of fields. Each field has an unordered set of values. The special field +"tag" has as its values any tags that are set for the key. Store in git-annex branch, next to location log files. -Metadata can be tags, but it can also be fields with values (ie, date=xxx, -conference=yyy). Fields can have multiple values, for example -multiple authors. - -Storage needs to support union merging, including removing tags, and -changing values. +Storage needs to support union merging, including removing an old value +of a field, and adding a new value of a field. ## automatically added metadata @@ -33,9 +31,6 @@ metadata is derived, at least year=yyyy and probably also month, etc. This is probably not stored anywhere. It's computed on demand by a pure function from the other metadata. -From the set of tags a file has, a "tag" field is derived, which has the -value of each tag. See example below. - Should be a general mechanism for this. (It probably generalizes to sql queries if we want to go that far.) @@ -65,10 +60,8 @@ filtered/year=2012,2013,2014/talk/conference=fosdem,icfp. Now there are nested subdirectories. They follow the format of the branch, so 2013/icfp, 2014/fosdem, etc. -`git annex filter tag=haskell,debian` uses the "tag" field that is -automatically derived from the set of tags. So this yields a branch -with haskell and debian subdirectories, containing the files tagged with -either. +`git annex filter tag=haskell,debian` yields a branch with haskell +and debian subdirectories. To see all tags, `git annex filter tag=*` ! |