Indexable

QName: f:indexable

Informs a node of how it should be indexed. Cloud CMS maintains multiple indexes including a search index, a database index and special indexes for things like path-based retrieval.

By default, all n:node instances have the f:indexable feature applied to them. The default behavior is for search to be enabled and for search-indexes to be updated synchronously upon a write.

Nodes that are indexed for search will take a little extra time on write (create or update) since the underlying ElasticSearch indexing engine must take the JSON and index it. If your node has any attachments, those attachments will have text extracted from them to fill out the index as well.

For performance reasons, you may wish to disable search indexing for some nodes. You can do this at either the node instance or node definition level (in which case the optimization will work for all nodes of that type).

In addition, for further performance reasons with large quantities of content, you may wish to apply custom database collection indexing for your repository branches. This is beyond the scope and intention of the f:indexable feature but is provided with per-branch index descriptions. Please see our documentation on indexing for more details.

Configuration

Property Type Default Read-Only Description
schedule text Defines how the search-index should be updated - either SYNCHRONOUS or ASYNCHRONOUS
disableSearchIndex boolean false Whether to disable the indexing of the node and it's attachments for full-text search.

Indexable Example

Here is an example of a type definition for an article. Full-text search is enabled and all search-indexes are to be computed in the background (asynchronously). Asynchronous computation means that the index may not update right away. You might commit 1000 nodes, for example, and then immediately search for them and not find them for several seconds.

If you require immediate search results, set the schedule to synchronous. The tradeoff is that synchronous search index updates will cause your commit to take longer.

{
    "title": "Article",
    "type": "object",
    "properties": {
        "author": {
            "type": "string"
        },
        "body": {
            "type": "string"
        }
    },
    "_features": {
        "f:indexable": {
            "schedule": "ASYNCHRONOUS",
            "disableSearchIndex": false
        }
    }
}