cancel
Showing results for 
Search instead for 
Did you mean: 

Space characters in Lucene path queries?

aspa
Champ in-the-making
Champ in-the-making
I noticed that path queries don't seem to work when the path criterion contains space characters.

Can space characters be escaped in some way in path queries to fix this?

The sample query I'm having problems with is the following:

PATH:"/app:company_home/cm:Intranet/cm:aa bb"

I'm using Alfresco community edition v2.1
2 REPLIES 2

aspa
Champ in-the-making
Champ in-the-making
the following seems to be working:

String path = "/app:company_home/cm:Intranet/cm:" + ISO9075.encode("aa bb");

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

Yes, spaces and a whole bunch of other characters need to be escaped as it conforms to XPATH. ISO9075 is the helper class to do this.

Andy