cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Query PATH Question

mtw999
Champ in-the-making
Champ in-the-making
I'm trying to query type from NodeBrowser query utility:

PATH:"/app:company_home/st:sites/cm:alftrain/cm:documentLibrary/cm:TestFolder01" TYPE:"{http://www.ziaconsulting.com/model/knowledgebase/1.0}article"

returns results

PATH:"/app:company_home/st:sites/cm:alftrain/cm:documentLibrary/cm:TestFolder01" TYPE:"{http://www.alfresco.org/model/content/1.0}content"

returns results

PATH:"/{http://www.alfresco.org/model/application/1.0}company_home/st:sites/cm:alftrain/cm:documentLibrary/c..." TYPE:"{http://www.alfresco.org/model/content/1.0}content"

fails with:
Failed to parse query: PATH:"/{http://www.alfresco.org/model/application/1.0}company_home/st:sites/cm:alftrain/cm:documentLibrary/c..." TYPE:"{http://www.alfresco.org/model/content/1.0}content"

why is the URI in the PATH not being resolved to app:company_home while TYPE is? Is this an XPATH issue?

Mike
3 REPLIES 3

mitpatoliya
Star Collaborator
Star Collaborator
May be internally it is tockenising the path with "/" to drill down to destination.
But if you put URI it will be ambiguous for search engine that might be the issue.

Also you are using combination of prefix and URI what is the behavior when you use URI for all?
and by the way is it just for the knowledge or any req?

mtw999
Champ in-the-making
Champ in-the-making
If I use only/all URI it fails. I was trying to determine where it was failing in PATH which is why there may appear to combination of prefix and URI (i.e. was URI for my custom type failing). I put the URI in type jsut as an experiment and TYPE is being resolved from URI. I was trying to figure out if there is some issue or something else I needed to do when using URI in PATH

Mike

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

When you use PATH you must use the form prefix:localName for each element. You can not us the URI.
Exactly as you cannot use the URI in an XPATH expresssion.

Andy