![No UI](https://img.shields.io/static/v1?label=UI&message=none&color=inactive) The "Smart Collections" plugin automatically updates the linked assets of specific nodes (the smart collections) based on a search filter. [MINITOC] ## General Properties To be configured in *{home}/appserver/conf/custom.properties*. ##### smartCollections.license > type: String, **required: yes**, default: - The license key for the plugin (product: smartCollections), provided by *brix*. ##### smartCollections.scheduler.cronExpression > type: String, **required: yes**, default: - A [Quartz](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) cron expression specifying when the task should run. ## Collection Properties The plugin supports several smart collections. The properties are set in the format *smartCollections.<number>.<property>* (e.g. *smartCollections.1.nodeId*). In the following properties *<number>* = 1 will be used as an example. ##### smartCollections.1.nodeId > type: Long, **required: yes**, default: - The node id of the smart collection. The corresponding node will be filled automatically according to the specified filter. ##### smartCollections.1.filter > type: String, **required: yes**, default: - ###### v2.x The filter expression for the smart collection, see [Search Util 2](/celum_extensions/search_util_2). **Warning: this is a breaking change, the new filter expression is more flexible and has more functionalities, but v1.x filter expressions won't work any more.** ###### v1.x A filter expression using the [anura syntax](https://docs.brix.ch/anura/api#search). Attention: the *search_* prefix has to be dropped and *search* was renamed to *text*. Ampersand (*&*) can be escaped by using *&amp;*. Additionally, there is a node by name filter: One of *node_contains* or *node_startswith* has to be set to apply this filter. It also requires the *node_type* (id) and optionally a *node* (id) to limit the search. The *language* parameter is also taken into consideration for the node search. E.g. `smartCollections.1.filter=node=1234&node_recursive=true&infofield=7,true` would find all assets linked to the node _1234_ (or any sub-node) where the information field _7_ (a checkbox) is true (checked) ##### smartCollections.1.locale > type: String, required: no, default: defaultLanguage The language used to filter. ##### smartCollections.1.failSilently > type: String, required: no, default: false, version: 2.0.6+ Don't write log entries if an asset cannot be added to or removed from the collection. E.g. useful for strict nodes. ##### smartCollections.1.batchSize > type: integer, required: no, default: 2000, version: 2.1.9+ Batch size for add and remove queries. Workaround for CELUM bug, the API doesn't partition the ids for MS SQL, so it fails if there are more than 2100 to be added or removed. ##### smartCollections.1.scope > type: String, required: no, default: - ###### v1.4.x only Exactly like `smartCollections.1.filter`, but it gets AND-ed with the filter when present, e.g. allowing you to use `or_mode` in the filter. ## Compatibility Matrix | Smart Collections | CELUM (min. version) | :----- | :----- | 1.0 | 5.13.3 | | 1.3.0 | 5.13.4 | | 1.4.0 | 6.4 (tested up to 6.8) | | 2.0.0 | 6.4 (tested up to 6.8) | | 2.1.0 | 6.10 (tested up to 6.12) | ## Release Notes #### 1.0 > Released: 2018-07-13 Initial version #### 1.3 > Released: 2019-01-28 Added license #### 1.4.0 > Released: 2020-10-09 Added `scope` parameter #### 2.0.0 > Released: 2021-01-11 Upgraded to search util 2 #### 2.1.0 > Released: 2022-05-11 Switch to nested SDK-Queries to boost the eval-performance massively