cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Queries

alfrescot3ster
Champ in-the-making
Champ in-the-making
Hello guys!

I have some problems with lucene queries. I have searched google for about 1 hour, but i didn't find a solution.

I want to create query, which gives me files, which are under a specific path and a specific file name.

That works so far, but the query just does a 'contains' for the filename attribute and not things like 'start with', 'ends with', and so on:


PATH:"/app:company_home/app:dictionary//*" +TYPE:"cm:content" +@cm\:name:email


I have tried several types of this query like:

PATH:"/app:company_home/app:dictionary//*" AND +TYPE:"cm:content" AND +@cm\:name:email
PATH:"/app:company_home/app:dictionary//*" AND TYPE:"cm:content" AND @cm\:name:"email"
PATH:"/app:company_home/app:dictionary//*" AND TYPE:"cm:content" AND @cm\:name:"email*"
+PATH:"/app:company_home/app:dictionary//*" AND +TYPE:"cm:content" AND +@cm\:name:"email*"


But I always get a full list of files, which are containing the name "email". I want to get files, which are starting with the name "email".

Someone got a solution please?
2 REPLIES 2

romschn
Star Collaborator
Star Collaborator
Instead of
@cm\:name:"email*"
, try using
@cm\:name:email*
and check. It should give you the results whose name starts with the text email.

Hope this helps.

alfrescot3ster
Champ in-the-making
Champ in-the-making
Thx for your answer, I have found the 'bug'.

I have tested it with the files, which are generated by Alfresco (e.g. "cm:new-user-email_fr.html.ftl" or "cm:emailbody_textplain_share_fr.ftl")
These files are not working quite good with the lucene search. If I test the same with own uploaded files, its working perfect.

I dont know what's going on there. Smiley Frustrated