Page 1 of 1

Find a Folder

PostPosted:Mon Mar 07, 2011 11:52 pm
by nils petersohn
hello,
i try to find a folder via the OKMSearchProxy

when i use the method findByName(folderName) i don't get any results. when i search via the web console i also get no results.
when i check the type "folder" in the webconsole one correct result is found.
I thought that i should use some query param to search for folders not for documents (the default type).
but in the query params there is no field: "type" ?

the possible fields are in the attachment picture.
how can i search for folders very easy? with:
Code: Select all
QueryResult[] find(String token, QueryParams params)
the query params are very clear but i am missing the "type" where i can set to folder:
see attachment

Re: Find a Folder

PostPosted:Tue Mar 08, 2011 2:17 pm
by nils petersohn
well xpath is a possible statement type:
Code: Select all
/jcr:root/okm:root//element(*,okm:folder)[@okm:name = 'folderName']

Re: Find a Folder

PostPosted:Tue Mar 08, 2011 8:16 pm
by pavila
OKMSearch.findByName() only works for documents.