I'm thinking how to do this:
I have a java backed webscript and need to upload documents. Some of them will be full indexed (content and metadata) and others only index the metadata.
I have read this way to add a custom aspect on model.xml
<aspect name="my:doNotIndexContentControl">
<title>Do Not Index Control</title>
<parent>cm:indexControl</parent>
<overrides>
<property name="cm:isIndexed">
<default>true</default>
</property>
<property name="cm:isContentIndexed">
<default>false</default>
</property>
</overrides>
<aspect name="my:doIndexContentControl">
<title>Index Control</title>
<parent>cm:indexControl</parent>
<overrides>
<property name="cm:isIndexed">
<default>true</default>
</property>
<property name="cm:isContentIndexed">
<default>true</default>
</property>
</overrides>
And I imagine that if I add on my webscript:
getNodeService().addAspect(nodeRef, "my:doNotIndexContentControl", null);
or
getNodeService().addAspect(nodeRef, "my:doIndexContentControl", null);
it puts my custom aspect defined on model in the nodeRef. Is the best solution for my problem? What do you think? Any recommentation?
Thanks!