Lucene query through webscript

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2012 07:31 AM
Hi,
I was wondering if there is a webscript in Alfresco 4.0.c to execute Lucene query's.
Several topics mentioned the possibility to execute querys through the Search API however I want to be able to query Alfresco, get the results (noderef, name, parentfolder, date added, last updated) in xml or json and present this data in an external application.
Does anyone have created such a webscript, or does it need to be created from the start?
Kind regards,
Marcel
I was wondering if there is a webscript in Alfresco 4.0.c to execute Lucene query's.
Several topics mentioned the possibility to execute querys through the Search API however I want to be able to query Alfresco, get the results (noderef, name, parentfolder, date added, last updated) in xml or json and present this data in an external application.
Does anyone have created such a webscript, or does it need to be created from the start?
Kind regards,
Marcel
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2012 07:42 AM
Hi,
according to http://wiki.alfresco.com/wiki/4.0_JavaScript_API#Search_API and http://wiki.alfresco.com/wiki/Search#Path_Queries you can do something like that:
Having the node you can get all information you need and put it in your favourite format.
Regards,
Andrea
according to http://wiki.alfresco.com/wiki/4.0_JavaScript_API#Search_API and http://wiki.alfresco.com/wiki/Search#Path_Queries you can do something like that:
luceneQuery = "PATH:\"/app:company_home/app:dictionary/app:saved_searches/cm:"+username+"/*\"";results = search.luceneSearch(luceneQuery);
where luceneQuery can contain any combination you may want written in lucene query compliant sysntax and results an array od ScriptNode objects.Having the node you can get all information you need and put it in your favourite format.
Regards,
Andrea

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2012 04:06 AM
Hi Andrea,
Thank you for your reply.
The javascript wasn't really the problem however figuring out to create the webscript was more my issue.
Kind regards,
Marcel
Thank you for your reply.
The javascript wasn't really the problem however figuring out to create the webscript was more my issue.
Kind regards,
Marcel
