cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene search query question.

tsongwei3
Champ in-the-making
Champ in-the-making
Hi
I have some question about lucene query.

I have the following structure:
Company_Home>Doc->1.1v->file.pdf
Company_Home>Doc->1.2v->file.pdf
Company_Home>Doc->1.3v->file.pdf

I am tryint to run a query to get "file.pdf" by different given query in my app, I tried the following:
(PATH:"/app:company_home/cm:Doc/cm:1.1v//*" ) AND (@\{http\://www.alfresco.org/model/content/1.0\}name:file.pdf)
This doesn't work. It seems I cannot have number directly after "cm:"

Then I tried..
(PATH:"/app:company_home/cm:Doc/cm:"1.1v"//*" ) AND (@\{http\://www.alfresco.org/model/content/1.0\}name:file.pdf)
But it returns all three files, instead of just for 1.1v.
Is there anything wrong in my query?

Thanks in advance!!
1 REPLY 1

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

The path elements need to be encoded according to ISO 9075.
There is a helper class to do this for you.

Andy