cancel
Showing results for 
Search instead for 
Did you mean: 

Search in alfresco space

swardi
Champ in-the-making
Champ in-the-making
Hi,
i am looking for an example how to get all documents stored in a space s1.

thanks.
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
You can take a look at SDK WebServiceSamples project in the Alfresco SDK, you can also find it at this URL:
http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/sdk/samples/WebServic...

You can change the Lucene query in the following way to search contents in a s1 space, remember to encode in the ISO 9075 format all the space names:

// the Lucene query is PATH:"/app:company_home/cm:s1/*"

String luceneQuery = "PATH:\"/app:company_home/cm:"+ISO9075.encode("s1")/*+"\"";

Query query = new Query(Constants.QUERY_LANG_LUCENE, luceneQuery);
Hope this helps.