cancel
Showing results for 
Search instead for 
Did you mean: 

Namespaces in path based searches

damonrand
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to path restrict a search. I'm getting this string back from nodeService.getPath(nodeRef)
/{http://www.alfresco.org/model/application/1.0}company_home/

So I'm putting together a search that looks like this..

PATH:"/{http://www.alfresco.org/model/application/1.0}company_home//*"

But I'm not getting any results. This search works fine.

PATH:"/app:company_home//*"

Do I need to do some escaping on the namespace?

Damon.
3 REPLIES 3

rivarola
Champ on-the-rise
Champ on-the-rise
Hello,

This is not a direct anwer to your question but it may help you…
When I want to use a computed path in Lucene search I use :
node_service.getPath(space).toPrefixString(namespace_service)

With the toPrefixString method you get app:company_home instead of full URI path.

damonrand
Champ in-the-making
Champ in-the-making
Thanks! That was pretty much exactly what I was looking for.

andy
Champ on-the-rise
Champ on-the-rise
Hi

Only prefixe are supported in PATH (as would be the case in XPATH)

Andy