Open etj opened 1 year ago
@powerusercelina We had a brief discussion and would vote for a system in which downward items are included but upwards items are not.
E.g. If you filter for a
a
- country
a.b[1-3]
- district
a.b[1-3].c[1-6]
- municipality
If I query for the country a
, all data for districts a.b[1-3]
AND municipalities a.b[n].c[1-6]
shall be returned. If I query for the district a.b[2]
only district 2 and municipality data a.b[2].c[n-m]
shall get returned but NOT country-level data.
As a continuation of #10995, regions info should be added to the new faceting API.
A couple of points make this faceting different from the ones already implemented
regions
are in a N:N relationship with ResourceBase objects (already seen with tkeywords)regions
are hierarchically organizedHierarchical organization is used to present the items when editing metadata. Should it also be used for searching?
As an example, consider this setup:
When filtering by "Country Y", should we also return "ResourceG"?
It does contain data related also to the single Countries, so that behaviour would make sense.
When counting data in the facets, resources associated to "CountryY" should be counted also in the "ContinentX" and in the "Global" faceted items?
Please note that counting in the facets should be reflected in how the resource filtering works, otherwise the faceting count and the resources returned when fitlering would mismatch.
As a first implementation for faceting, in order not to disrupt the current behaviour, we'll be returning the count for the assigned regions without considering the hierachy. Since the changes in filtering is a semantic change and could go deep in the code, we'll create a GNIP about that.