Falkland CMS

68 thoughts
last posted Oct. 1, 2013, 2:19 p.m.

62 earlier thoughts

0

Day 83 - September 14, 2013

Set up the scaffolding for categorize-item and uncategorize-item tests.

Wrote the failure case tests for categorize-item.

Implemented the failure cases for categorize-item.

Thought through what should be in the JSON in CouchDB and REST API and in the data structure for the Clojure API for a categorization of an item. Particularly interesting are the parents of a categorization. Do they appear or are they just implied by the path?

Example:

Categorize an item as: /tax/a/b/c

Do you see:

  • /tax/a
  • /tax/a/b
  • /tax/a/b/c

Or just:

  • /tax/a/b/c

I certainly expect the item to show up when I ask for items of /tax/a/b, but does /tax/a/b need to be in the JSON payload?

It'll need to be emitted in the CouchDB view, so that searches for /tax/a/b will find the items categorized as /tax/a/b/c. That's for certain.

A related question is when I categorize as /tax/a/b/c then I uncategorize. Do I need to uncategorize as /tax/a, or even as /tax? Does uncategorizing as /tax/a/b/c imply it's still a /tax/a/b?

Similarly, if I have an item categorized as /tax/a/b and I then categorize it as /tax/a/b/c is it categorized as both? Or is it no longer categorized as /tax/a/b?

5 later thoughts