I've working on a c++ project involving alfresco. I want to search a document by name, but the webscripts provided by alfresco requires fileId. I don't want to create a custom new webscript. so the question is there any existing webscript that supports search by name of the document?
-
What are you trying to do? Search in the Share UI? Explorer? From an external system? What format do you want your results in? HTML? JSON? XML? Other? – Gagravarr Jun 13 '13 at 14:09
-
I'm writing a c++ code which searches the document in the alfresco from external system, the result format can either be in Json or xml – Charzhard Jun 14 '13 at 04:26
-
Have you thought about using CMIS? That'd let you query the repo, find things, traverse, fetch the contents etc – Gagravarr Jun 14 '13 at 09:02
-
I used cmis i was able to query and fetch document based on the document id, My scenario is know the folder name and document name i want to get the details of that document based on the details – Charzhard Jun 14 '13 at 09:26
2 Answers
There is a repository-tier webscript designed for search purpose: http://host:port/alfresco/service/slingshot/node/search
, it accepts many url params but the important ones are : q
, lang
and store
.
An example would be like this : http://localhost:8080/alfresco/service/slingshot/node/search?q=%40name%3A%22name%22&lang=lucene&store=workspace%3A%2F%2FSpacesStore
where q = @name:"name"
, lang=lucene
and store=workspace://SpacesStore
Webscript response will be in json
format by default.

- 182
- 1
- 2
- 11
The buildin Alfresco keyword search webscripts would at list allow you to search the repo for a given searchterm and to retrieve them for example as an atom feed.
Have a look at the webscript package located below
http://<yourAlfrescoHost>/alfresco/service/index/package/org/alfresco/repository/search

- 1,302
- 9
- 16