cancel
Showing results for 
Search instead for 
Did you mean: 

getting NodeRef of dictionary without using lucene queries

mhb
Champ on-the-rise
Champ on-the-rise

Hello,

   How can i get the NodeRef of dictionary without using lucene queries?

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator

Use the XPath based selectNodes operation to lookup nodes without requiring Lucene / SOLR.

If you're referring to the "Data Dictionary" node, then as Axel says ... some Java examples (untested):

...

NodeRef storeRootNodeRef = nodeService.getRootNode(new StoreRef("workspace://SpacesStore"));
NodeRef ddNodeRef = searchService.selectNodes(storeRootNodeRef, "/app:company_home/app:dictionary", null, namespaceService, false).get(0);

or

...

NodeRef ddNodeRef = searchService.selectNodes(repositoryHelper.getCompanyHome(), "/app:dictionary", null, namespaceService, false).get(0);

Regards,

Jan