Ticket #4895 (closed defect: fixed)

Opened 11 months ago

Last modified 11 months ago

Tag unions and intersections

Reported by: ryan Assigned to: anonymous
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

tag_intersect_union.diff (5.3 kB) - added by ryan on 09/03/07 05:08:17.

Change History

09/03/07 03:24:23 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

09/03/07 03:26:57 changed by ryan

(In [6012]) tag_id not tagid. see #4895

09/03/07 03:27:28 changed by ryan

  • summary changed from Category unions and intersections to Tag unions and intersections.

09/03/07 04:00:27 changed by ryan

  • status changed from closed to reopened.
  • resolution deleted.
  • description changed.

09/03/07 04:01:03 changed by ryan

  • description changed.

09/03/07 04:01:36 changed by ryan

  • description changed.

09/03/07 05:08:17 changed by ryan

  • attachment tag_intersect_union.diff added.

09/03/07 05:10:20 changed by ryan

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.

09/03/07 17:05:37 changed by markjaquith

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.

09/03/07 17:36:57 changed by ryan

It's kinda there mainly for plugins that already have an ID. We could keep it and make it private.

09/03/07 18:14:05 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [6021]) Tag unions and intersections. fixes #4895