cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Web Services API doesn't work

bensonfungjava
Champ in-the-making
Champ in-the-making
Hi,

I am new to Alfresco Web Service API.  I recently insert almost 6 million document into Alfresco via Alfresco Web Service API.
However, it looks like cannot continue to insert more and keep throwing exception at WebServiceFactory.getRepositoryService().query(…)  and return a null value with Socket TimedOut.

However, if the Alfresco only contains few documents, the API works fine.

Please suggest what could be the problem look like.


Thanks
12 REPLIES 12

mrogers
Star Contributor
Star Contributor
You need to change your query as I've said above, then it should work fine.    Have you tried it yet?  

Also you need to work out what else you want to do, for example a person navigating through 6 million documents in a single folder is unlikely to be a nice user experience, even if you are paging through a few hundred results at a time on Alfresco 4.  Probably split it up into a tree makes more sense.

bensonfungjava
Champ in-the-making
Champ in-the-making
Hi mrogers,

I am trying to modify the query string.  Before that, I got quick question in terms of the query string.

I created a folder called loadingTest2 under 'Company home' folder and then look for all folders under loadingTest2.

Then the query should be

PATH:"//app:company_home/loadingTest2" AND TYPE:"cm:folder"

OR

PATH:"//app:company_home/cm:loadingTest2" AND TYPE:"cm:folder"

and why?

I am very new to the Alfresco query right now.

Please help


Thanks

openpj
Elite Collaborator
Elite Collaborator
The query should be the following:
PATH:"/app:company_home/cm:loadingTest2" AND TYPE:"cm:folder"
Because Alfresco stores nodes using XPATH for the primary parent associations. This means that Alfresco keep nodes structured using a primary tree structure based on the XPATH standard.
For each child node you have to define a prefix that is mapped in a specific namespace definition in the XPATH environment of Alfresco.

If you try to browse contents using the Node Browser you can see that each child node as referred with parents using the XPATH structure for all the primary child association instances.

In this case we are executing a query using the PATH token of Lucene, and here we have to remind that we need to use the XPATH notation.

Hope this helps.