cancel
Showing results for 
Search instead for 
Did you mean: 

lucenesearch only on uploads files

sopre
Champ in-the-making
Champ in-the-making
Hello everybody,

I need your help for this script plz.

i want search and move the doc, but only the file who are upload not the files on the folders. actually only the file on the folder are moved and not the file upload

my script is :
<code>
// log the docs that currently contain the word 'Alfresco' to a log file
var destination = companyhome.childByNamePath("/sites/sodip/documentLibrary/BON_LIVRAISON");

var docs = search.luceneSearch("+PATH:\"/app:company_home/st:sites/cm:sodip/cm:documentLibrary/cm:_x0031__x0020_SCAN/*\"+TEXT:Livr. and Bon");
for (var i=0; i<docs.length; i++);
   for (var i=0; i<docs.length; i++)
   {
      docs.move(destination);
   };
<code>

is someone can help.

Thank you.

Alfresco 4.2.d
windows serveur 2003
2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
TEXT field means  doing a full text search over all d:content type properties of the node.
So
TEXT:Livr. and Bon 
means finding nodes that have the word "Livr. and Bon" in any content property:
is that what you want ? if it is not ,you have wrong search string.

sopre
Champ in-the-making
Champ in-the-making
Oups, no is not that.

I want search only on the present node, not the subfolder, and only the words "Livr. and Bon" on the upload document on the folder.

thank you for your answer.