cancel
Showing results for 
Search instead for 
Did you mean: 

alfresco community version: save and reload data via webservice -> delay problem

robobot
Champ in-the-making
Champ in-the-making
hello there,

we still use the old way to communicate in our application with alfresco. sometimes i have to save documents in alfresco and immediately reload them.




//upload documents in a specific folder
WebServiceFactory.getRepositoryService().update(cml);
//try to load the before written documents
nodes = WebServiceFactory.getRepositoryService().get(new Predicate(null,STORE,query));


but the size for nodes is 0 at this point, although everything is technically right and the new content can be seen in alfresco. now, when i try to call


nodes = WebServiceFactory.getRepositoryService().get(new Predicate(null,STORE,query));


in a period between 5 and 30 seconds again, nodes has the expected result.

is there way to make such webservice-queries synchron?

thanks in advance,
steve





3 REPLIES 3

mrogers
Star Contributor
Star Contributor
We service queries should be atomic already.   Is your problem with the async indexing instead.    What sort of query are you attempting?   How is search configured?

robobot
Champ in-the-making
Champ in-the-making
we use lucene-queries. a query may look like:


+PATH:"/app:company_home/cm:Customer/cm:Zuse_x002c__x0020_Konrad//*" AND TYPE:\{http\://www.alfresco.org/model/content/1.0\}content


referring to this we have never changed anything in property files like the "repository.properties".

i just read the section about configuring lucene-search here:

http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fsearch-fts-...

but i found nothing special. the mentioned data dictionary options are as follows in our "contentModel.xml":


      <type name="cm:content">
         <title>Content</title>
         <parent>cm:cmobject</parent>
         <archive>true</archive>
         <properties>
            <property name="cm:content">
               <type>d:content</type>
               <mandatory>false</mandatory>
               <!– Although content is marked as indexed atomically it may end up asynchronous –>
               <!– if the content conversion will take too long. Content that does not require conversion –>
               <!– to UTF8 test/plain will always be indexed atomically –>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>false</stored>
                  <tokenised>true</tokenised>
               </index>
            </property>
         </properties>
      </type>


any other hint would really be appreciated.

robobot
Champ in-the-making
Champ in-the-making
i figured out, that


index.subsystem.name=solr


in "alfresco-global.properties" caused the problem after renaming or copying spaces 😕

after changing this to:


index.subsystem.name=lucene


everything works well.