cancel
Showing results for 
Search instead for 
Did you mean: 

Another Lucene searching question...

greglenain
Champ in-the-making
Champ in-the-making
To look for a specific document through a given path, I use a query of the form:

PATH:"/app:company_home/cm:someStandardDirectory/cm:*"

where "someStandardDirectory" is the name of a standard folder node (whose namespace has prefix "cm").

But, if I want to drill a user directory, I have to write:

PATH:"/app:company_home/sys:someUserDirectory/cm:*"

where "someUserDirectory" is a user home directory (whose namespace has prefix "sys").

How to get rid of these namespace prefixes?

I tried things such as:
- PATH:"/app:company_home/someDirectory/cm:*"
- PATH:"/app:company_home/*:someDirectory/cm:*"
- PATH:"/app:company_home/*[@alf:name='someDirectory']/cm:*"
But nothing works.

Thanks.
1 REPLY 1

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

The PATH attribute in lucene is NOT a full XPATH implementation.
It is just the path (no predicates). You can user the XPATH query if you want this.

PATH is a subset of XPATH. This means you have to provide the namespace prefix. It is part of the qualified name. No prefix means not in any namespace, and * is not allowed for the namespace. I find this annoying too.

If you want to find both then or them together (just include both)

PATH:"/app:company_home/cm:someDirectory/cm:*"  PATH:"/app:company_home/sys:someDirectory/cm:*"

in the same query.


Regards

Andy