It is possible to use page name keywords "top" and "parent" in property references ("parent.property" would refer to a property on the page one level up from the class identified in the Source Class Context field; "top.property" would refer to a property on the primary or top-level page of the Applies Toclass); however, these references are not reliable.
Change tracking only works with properties that are defined within the page context path. references to "top", "parent", or another named page are not within that path. If you have an instance, and you change a property which is referred to by a "parent" or "top" reference, you cannot be sure that the indexes for that instance will be updated.
Avoid using "top" or "parent" references unless the properties they refer to are constant throughout the lifetime of an instance.
Thanks for your reply, Actually we are using same Declare Index in different class for different purpose, and in that Declare Index( Pages & Classes) a page name With TOP is declared. But the one Declare index i posted doesn't have any Pages & Clases, If i give TOP page in Pages and Clasess will it be helpful.
Parent and Top references in Rule-Declare-Index are not always reliable --> Invalid document link.
See Document content below:
Top and Parent references in a Rule-Declare-Index are not always reliable.
This has to do with the way that change tracking works with Rule-Declare-Index. Change tracking works only with properties which are defined within the page context path. It does not work for properties outside this path--and this would include "Parent" references, "Top" references, and references to other named pages.
This means that if you have an instance, and you change a property which is referred to by a Parent or Top reference, then you cannot be guaranteed that the indexes for that instance will be updated. They might be updated--and they'll certainly always be updated if any properties within the page context path change--but there's no guarantee.
The advice we should give people about using Top and Parent references in a Rule-Declare-Index is that they should be avoided unless the properties they refer to are constant throughout the lifetime of an instance.
If you believe that you really need to pull in a Top or a Parent property into an index, you might consider a couple of alternatives:
The best alternative is to not use the Top or Parent property in the index at all. Instead, when you are report on the indexes, do a join against the original instance class--where the Top or Parent property already lives.
A less ideal alternative is to use a Rule-Declare-Expressions to maintain a copy of the Top or Parent property in a new property which is in the page context path.