As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
How to use lucene to search a file by name to get a unique return file. I used "TEXT:"filename but get an exception (AxisFault). It appears that it return nothing or ??
Query query = new Query(); query.setLanguage(Constants.QUERY_LANG_LUCENE); query.setStatement("@cm\\:name:\"yourdocument.doc\""); … repositoryService.query(store, query, false);
How to invoke UploadContentServlet in web service program? Do I have to run the program on web server side or I can run from remote client machine has the client web service installed?
How to use lucene to search a file by name to get a unique return file. I used "TEXT:"filename but get an exception (AxisFault). It appears that it return nothing or ?? Query query = new Query(); query.setLanguage(Constants.QUERY_LANG_LUCENE); query.setStatement("@cm\\:name:\"yourdocument.doc\""); … repositoryService.query(store, query, false); Thanks, yours is working. How to add path before the file name? Such asQuery query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:folder1/cm:folder2/……)How to invoke UploadContentServlet in web service program? Do I have to run the program on web server side or I can run from remote client machine has the client web service installed?You want to upload a file?Please review this post how it works: http://forums.alfresco.com/en/viewtopic.php?f=27&t=7346
Thanks, yours is working. How to add path before the file name? Such asQuery query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:folder1/cm:folder2/……)
parentNode.setChildName(Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, normilizeNodeName( spaceName ))); newNodeProperties = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, spaceName )}; CMLCreate cmlCreate= new CMLCreate("1", parentNode, null, null, null, Constants.TYPE_FOLDER, newNodeProperties ); CML createSpaceCML= new CML(); createSpaceCML.setCreate(new CMLCreate[]{cmlCreate}); … WebServiceFactory.getRepositoryService().update(cml); …
Also, If I want to use the web service with upload servlet API, where to put the source file to be uploaded?
Thanks, yours is working. How to add path before the file name? Such asQuery query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:folder1/cm:folder2/……)Try following: parentNode.setChildName(Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, normilizeNodeName( spaceName ))); newNodeProperties = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, spaceName )}; CMLCreate cmlCreate= new CMLCreate("1", parentNode, null, null, null, Constants.TYPE_FOLDER, newNodeProperties ); CML createSpaceCML= new CML(); createSpaceCML.setCreate(new CMLCreate[]{cmlCreate}); … WebServiceFactory.getRepositoryService().update(cml); … What I meant is that I want to do a search a document, I want to use the full node path in the query statement. For example: the statement similar to: Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:space1/cm:space2/cm:GuardFile.txt\"");But it does not work. how to make a correct query PATH for this example?Also, If I want to use the web service with upload servlet API, where to put the source file to be uploaded?That doesnt matter at all. As long as your Client and Server can communicate which each other you dont have to think about such a manner. The only thing you have to do is to set up binary upon the the API.For more informations please have a look to following site: http://wiki.alfresco.com/wiki/IngresTutorial_Alfresco_Web_Service_API_for_Java