Finds all the documents containing the text ‘Alfresco’ using a Lucene search and records the results to a log file:
// log the docs that currently contain the word 'Alfresco' to a log file
var logFile = userhome.childByNamePath('alf docs.txt');
if (logFile == null)
{
logFile = userhome.createFile('alf docs.txt');
}
if (logFile != null)
{
// execute a lucene search across the repo for the text 'alfresco'
var docs = search.luceneSearch('TEXT:alfresco');
var log = '';
for (var i=0; i<docs.length; i++) {
// do something
}
文档更新时间: 2020-02-16 15:50 作者:凌云文档