Construct web script search parameter from Alfresco query log

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2014 03:18 AM
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
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
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2014 04:07 AM
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
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
