Correctly count tag categories

If multiple tags of the same category are applied to the same item,
just summing tag counts will produce the wrong results as now items
are counted multiple times.
This commit is contained in:
Eike Kettner
2021-04-11 13:57:49 +02:00
parent 132730b19c
commit 3e0914ece7
10 changed files with 79 additions and 8 deletions

View File

@ -4242,6 +4242,7 @@ components:
required:
- count
- tagCloud
- tagCategoryCloud
- fieldStats
- folderStats
properties:
@ -4250,6 +4251,8 @@ components:
format: int32
tagCloud:
$ref: "#/components/schemas/TagCloud"
tagCategoryCloud:
$ref: "#/components/schemas/NameCloud"
fieldStats:
type: array
items:
@ -4354,7 +4357,7 @@ components:
$ref: "#/components/schemas/TagCount"
TagCount:
description: |
Generic structure for counting something.
Structure for counting tags.
required:
- tag
- count
@ -4364,6 +4367,30 @@ components:
count:
type: integer
format: int32
NameCloud:
description: |
A set of counters.
required:
- items
properties:
items:
type: array
items:
$ref: "#/components/schemas/NameCount"
NameCount:
description: |
Generic structure for counting something.
required:
- name
- count
properties:
name:
type: string
count:
type: integer
format: int32
AttachmentMeta:
description: |
Extracted meta data of an attachment.