05-01-2018 09:21 AM
Hi,
Greetings of the day!
currently, I am using alfresco 5.0d.
I want a list of noderef from tag name within a particular folder.
So for that, I am using tagging service.
TaggingService().findTaggedNodes(node.getStoreRef(), ISO9075.encode(tag), node);
its working fine, but its working on Lucene query. So every time I am not get updated data.
I am decreasing cron time to 2 seconds
alfresco.cron=0/2 * * * * ? *
But still i am not getting updated response.
So is there other way to get this updated response.
Thanks in advance.
05-03-2018 02:27 AM
Adding to previous reply,
Solr indexing works independent based on cron expression you configure. You will only receive data in query response after it get indexed. it means real time search using solr query is not possible.
Alfresco provide multiple way to perform search. CMIS does search in DB hence it can be used to search transaction data too (here are configuration steps). You need to be mindful using right predicate. If you use right predicate in where, it will perform search in DB otherwise it will take support of indexes. Refer https://docs.alfresco.com/community5.0/concepts/intrans-metadata-query.html
05-01-2018 11:48 AM
I think that you would have to live with the eventual consistency when using solr based queries. Maybe the transactional metadata queries can help in this case - but you‘d have to reconfigure Alfresco (db Indexes) for this...
05-03-2018 02:27 AM
Adding to previous reply,
Solr indexing works independent based on cron expression you configure. You will only receive data in query response after it get indexed. it means real time search using solr query is not possible.
Alfresco provide multiple way to perform search. CMIS does search in DB hence it can be used to search transaction data too (here are configuration steps). You need to be mindful using right predicate. If you use right predicate in where, it will perform search in DB otherwise it will take support of indexes. Refer https://docs.alfresco.com/community5.0/concepts/intrans-metadata-query.html
05-09-2018 01:46 AM
hi Jayesh Prajapati
Thank you so much for your valuable reply.
can I use this query for getting test folder noderef in CMIS?
select *
from cmis:document
where contains('PATH:"/app:company_home/st:sites/cm:abc/cm:documentLibrary/cm:ffb203a9a92f469c97c1e461549cb932/cm:audit/cm:_x0030_0002016/cm:_x0032_5dbfe00f48b436f82fcadb1de76935b/cm:Test"')
searchService()
.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_CMIS_ALFRESCO, querty);
this query gives me data from a direct database?
Please suggest me.
Thanks in Advance.
05-09-2018 03:20 AM
Hi KPatel _
If I am not wrong, contains predicate will not search on DB. It will take help of index.
05-09-2018 04:24 AM
Hi KPatel _
Hope you try following too,
NodeRef companyHome = getCompanyHome();
String path = "company_home/sites/abc/documentLibrary/ffb203a9a92f469c97c1e461549cb932/audit/_x0030_0002016/_x0032_5dbfe00f48b436f82fcadb1de76935b/Test";
List<String> pathElements = Arrays.asList(StringUtils.split(path, '/'));
NodeRef templateRef = fileFolderService.resolveNamePath(companyHome, pathElements).getNodeRef();
I'm not to sure about path you mentioned but I've used it in one of my project to resolved folder path.
Explore our Alfresco products with the links below. Use labels to filter content by product module.