Opened 6 years ago
Closed 6 years ago
#4895 closed defect (bug) (fixed)
Tag unions and intersections
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3 |
| Component: | General | Version: | 2.3 |
| Severity: | normal | Keywords: | taxonomy, tags |
| Cc: |
Description (last modified by ryan)
As was done for categories in #4750, let's add private tag__in, tag__and, and tag__not_in query vars.
Let's also decide on how to specify intersections and unions in the public query vars. We have tag_id and tag. tag_id currently takes a single numeric ID, and tag takes a single tag slug. tag is the var we use when creating links and such. tag_id isn't exposed anywhere at the moment. I think we can extend tag to allow the use of "+" to request tag intersections and commas to request unions. Only one or the other can be specified in the same request.
tag+tag2+tag3
tag,tag2,tag3
Attachments (1)
Change History (11)
- Summary changed from Category unions and intersections to Tag unions and intersections
- Description modified (diff)
- Resolution fixed deleted
- Status changed from closed to reopened
Patch parses "tag" queries that can plus and comma. Intersections are parsed into tag_slug__and and unions are parsed into tag_slug__in. The joins are rather hairy. Don't know if it would be best to get the IDs for the slugs in a separate query to spare the extra join.
comment:8
markjaquith — 6 years ago
Regarding tag_id, I don't think we should ever expose that because I don't think we should ever rely on that ID being static.
It's kinda there mainly for plugins that already have an ID. We could keep it and make it private.
comment:10
ryan — 6 years ago
- Resolution set to fixed
- Status changed from reopened to closed

(In [6011]) tagin, tagnot_in, and tag_and queries. fixes #4895