cancel
Showing results for 
Search instead for 
Did you mean: 

Applying an aspect to modify node behaviour at runtime

thagg1975
Champ in-the-making
Champ in-the-making
Hi

maybe just a novice question but I would appreciate your thoughts on the matter.

Lets say we have a document of type 'e_document' (custom type with own properties defined).

We apply the 'Versionable' Aspect and our own custom aspect named 'e_document_content' that defines some properties, e.g.

introduction (d:text)-> index enabled=true, tokenizable=true, stored=true, atomic=true
title (d:text)-> index enabled=true, tokenizable=true, stored=true, atomic=true

In our application we have the functionality to publish (means that we set a specific property to 'published' for the latest version of a document.) At the same time we want to modify for all previous versions (well, just the one before the current) the behaviour of some properties (namely the 'e_document_content' aspects' properties).

So the thought is that we apply a new aspect with the intention to modify the properties defined in the e_document_content aspect. The new aspect would be e_document_content_prev_version_aspect :

introduction (d:text)-> index enabled=false
title (d:text)-> index enabled=false

Is this possible? Or is there another way to ensure that the previous documents do not occupy space in the indexes ?
1 REPLY 1

invictus9
Champ in-the-making
Champ in-the-making
Let me rephrase your question to see if I understood it.

When you publish a newer version of a document, you want older versions to not appear when you do searches?

The indexer indexes everything; that is part of its power in a content management system. What you might want to do instead is to add a "published" property that is set to false in material that you don't want to be normally visible, and set to true in published material. Then you would qualify your searches to say that you only wanted to see results that had "published" set to true. You would do this with a custom search screen.