Default search scope example

Hi,

Could anybody write an example of using default search scope (using interface ISearchScope). I offer to supplement sample project in attachment.

The purpose is that for every Subscriber instance I can choose Role instances which created in the child Provider node.

Best Regards,

Oleg



Attachment(s):
Test2.rar.zip
2 comments
Comment actions Permalink

Oleg,

The query to obtain needed Role nodes: enclosingNode.ancestor<concept = Provider, +>.role;

If you want to use ISearchScope, you can inherit from AbstractSearchScope and implement only one method - that finds nodes by condition. It should filter those nodes found by the query specified using the given filter. But if you don't need any extra functionality, it would be better to just return the results of this query, not ISearchScope. In this case, ISearchScope will be constructed by default.

Regards,

Mihail

0
Comment actions Permalink

Thanks, Mihail

0

Please sign in to leave a comment.