Word Count

QName: f:word-count

Indicates that a node should track the number of words in each text property.

Configuration

This feature does not require configuration.

Word Count Example

Suppose we have a content type (my:article) that looks like this:

{
    "_qname": "my:article",
    "_type": "d:type",
    "type": "object",	
    "properties":{
        "title": {
            "type": "string"
        },
        "body": {
            "type": "string"
        }
    },
    "mandatoryFeatures": {
        "f:word-count": {}
    }
}

Now we create a piece of content of this type. We set the following:

  • title -> Hello World
  • body -> Cloud CMS is Awesome!

When we save this content, you'll end up with something like this:

{
    "title": "Hello World",
    "body": "Cloud CMS is Awesome!",
    "_features": {
        ...,
        "f:word-count": {
            "counts": {
                "title": 2,
                "body": 4,
                "*": 6
            }
        }
    }
}