cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene Query

pmrreddy
Champ on-the-rise
Champ on-the-rise
Hi All,


I need a query in lucene Java Service as,

I have my custom nodes(is:docType) in diffrent folders in the user homes of different users. I need to get all my is:docType nodes based on parent name .

Get all is:docType where parent name = 'xyz'


Regards.
pmr
2 REPLIES 2

romschn
Star Collaborator
Star Collaborator
In this case you should probably be using the PATH query. Place the entire path to the designated folder and add criteria of document type as shown below. Generate the path dynamically based on the parentname.
PATH:"/app:company_home/cm:Folder1/cm:folder2//*" AND TYPE:"is:docType"

kaynezhang
World-Class Innovator
World-Class Innovator
what do you mean by parent name ?

If you want to find some nodes beneath some node and with specified type ,you can combine PATH Query and TYPE Query:

PATH Query : PATH:"/app:company_home//*"
TYPE Query : TYPE:"is:docType"
combine the two +TYPE:"is:docType" AND +PATH:"/app:company_home//*"