12-06-2016 04:57 AM
I have a JS based webscript to upload the file to Alfresco and another webscript to retrieve all the uploaded files. Basically once user upload the file I redirect user to file retrieval WS. Even if the file has been successfully uploaded to the Alfresco yet my document retrieval WS needed to be refresh again and again till the uploaded file appears.
In my existing doc retieval WS I am using lucene search to retrieve the nodes from a particular directory:
nodes=search.luceneSearch("PATH:\"/app:company_home/st:sites/cm:"+siteName+"/cm:documentLibrary/cm:"+folder+"/*\" ");
Any suggestions which file should be modified to achieve dynamic node population, either .js file(use any other node retrieval method) or .ftl file(asyn calls to WS until the new data is populated)?
12-07-2016 07:07 PM
I believe the problem you are facing with is what is called Eventual consistency | Alfresco Documentation
As you have just created the content, it will take some time to have it indexed by solr, and because of that, you will have to wait until you see the object in the query response.
12-08-2016 07:42 AM
Well I think this is the case, how can I overcome? Do I need to retrieve the nodes by nodescript api instead of search?
12-08-2016 07:54 AM
This blog post will give you some useful information
Alfresco’s Transactional Metadata Query System – Mystery Results
12-08-2016 09:12 AM
First off thanks bro!
As per aforementioned article "CONTAINS" isn't supported by Transactional Metadata Queries. But I need to use it since my query retrieve nodes based on path. Any suggestion?
12-08-2016 10:40 AM
Can you share the query you are executing?
And if possible, post here a example of the folder structure you are creating.
12-08-2016 11:30 PM
currentSearch="PATH:\"/app:company_home/st:sites/cm:"+siteName+"/cm:documentLibrary/cm:"+folder;
I take a parameter in my url lets say path=docket01-myFolder01-New1 on the basis of "-" I split the parameter and each separated string represent a folder. So in this case I need to show all the files and folders inside "New1". I did it by traversing to folders using childByNamePath and updates my lucene search query
currentSearch+="/cm:"+subFolder;
nodes = search.luceneSearch(currentSearch);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.