Specifying Content Item Field Indexes

Content item field indexes are specified in the content-type resource. In order to be able to index any of the fields in a content type, you must add a neo.xredsys.service.article.attribute parameter to the content type definition:

<content-type>
...
  <parameter name="neo.xredsys.service.article.attribute" value="true"/>
</content-type>

Once you have done this, you can specify indexing of individual fields within the content type by adding neo.xredsys.service.article.attributeField parameters to the field definitions:

<field name="priority" type="number">
  ...
  <parameter name="neo.xredsys.service.article.attributeField" value="priority"/>
</field>

Note that the value attribute is set to the name of the field that is to be indexed. The neo.xredsys.service.article.attributeField parameter actually determines the name that you will need to use to identify the indexed field in the article:list tag. You could set it to some other name, but you are advised not to do so.

If white space is significant in the indexed field, then you should also add a neo.xredsys.service.article.attributeField.notrim parameter as follows:

<field name="formatted" type="basic">
  ...
  <parameter name="neo.xredsys.service.article.attributeField" value="priority"/>
  <parameter name="neo.xredsys.service.article.attributeField.notrim" value="true"/>
</Field>

If you do not specify this parameter then for indexing purposes all leading and trailing white space will be trimmed from the field, and all internal white space will be normalized to a single space character.