How does the 25 Related label picked in a page
How does the 25 Related label picked in a page?
Based on below's code:
select
distinct label,
count(labelling2.label)
from
Label as label,
Labelling as labelling1,
Labelling as labelling2,
SpaceContentEntityObject as sceo,
Space as space
where
labelling1.label.id = :labelID and
labelling1.content = labelling2.content and
labelling2.label.id != :labelID and
labelling2.content = sceo and
sceo.space = space and
lower(space.key) = :spaceKey and
labelling2.label = label and
label.namespace = 'global'
group by
labelling2.label,
label,
label.namespace,
label.name,
label.owningUser,
label.creationDate,
label.lastModificationDate
order by
count(labelling2.label) desc
It's based on the number of occurrences of the following:
- The other label's shared content
- The other label's shared spaces
Example:
- LabelA is on the same page with LabelB (count the amount of pages that this happens, higher = higher in the list)
- LabelA is on the same space as LabelB (count the amount of spaces that thishappens, higher = higher in the list)
Last modified on Oct 7, 2015
Powered by Confluence and Scroll Viewport.