cancel
Showing results for 
Search instead for 
Did you mean: 

need correct solution for search.luceneSearch

janaka1984
Star Contributor
Star Contributor
i stored PDF file in following hierarchy.

Company Home > Someco > whitepaper

To read that file from my dashlet i used " search.luceneSearch " on javascript. but it did not work

var whitepapers = search.luceneSearch("+PATH:\"app:company_home"
+"/cm:"+search.ISO9075Encode("Someco")
+"/cm:"+search.ISO9075Encode("whitepaper")+"//*\" +TEXT:\"searchString\" ");

error was emerged with no found file.

pls give me full sample to identify bcz i am new to alfresco
1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator

If you want to find all nodes below "Company Home > Someco > whitepaper" and with "searchString" in the text of the content properties ,you can write like below

"+PATH:\"/app:company_home/cm:Someco/cm:whitepaper//*\" +TEXT:\"searchString\""

If you want to find all nodes below "Company Home > Someco > whitepaper" and with "searchString" in other properties(for example cm:title) ,you can write like below

"+PATH:\"/app:company_home/cm:Someco/cm:whitepaper//*\" +@cm\:title:\"banana\""