cancel
Showing results for 
Search instead for 
Did you mean: 

Construct web script search parameter from Alfresco query log

davedran
Champ in-the-making
Champ in-the-making
Hi!

I did a Alfresco query and the log file show this as the query string

(((isRecord:"*" AND -isObjective:"*") and (opa:assignedTo:"dave")  AND (+TYPE:"cm:content" +TYPE:"cm:folder")) AND -TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating") AND NOT ASPECT:"sys:hidden"


How do I construct this into Lucence query string (to be used with Node Browser) and also into web script.

Thank you.

David
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

why do you need to turn this query into a Lucene query string? This is Alfresco Full Text Search syntax and can be used both in the Node Browser and in Web Scripts to query programmatically. Just use the "fts-alfresco" search language and you are good to go.
For details on how a Lucene query is constructed, have a look at <a href="https://wiki.alfresco.com/wiki/Search#Lucene">Lucene</a> in the Alfresco Wiki. The main difference is how properties are addressed and terms need to be escaped. Properties are prefixed with an "@" and require the ":" of their short name to be escaped (i.e. @opa\:assignedTo:"dave").

Regards
Axel