How to utilize queryparams
PostPosted:Fri Jun 29, 2018 3:53 am
by jorseng
Hi Jllort,
I would like to know if there are any samples for scripting to query the following:
1. set query to only search for document in a specific folder
2. set query to search documents with a specific metadata value.
Re: How to utilize queryparams
PostPosted:Sat Jun 30, 2018 3:49 pm
by jllort
You should read this section of the documentation:
https://docs.openkm.com/kcenter/view/ok ... dPaginated
And about filtering by metadata or an specific folder is so easy:
Code: Select all// Filtering by metadata
Map<String, String> properties = new HashMap();
properties.put("okp:consulting.name", "name value");
qParams.setProperties(properties)
// Filtering by folder
qParams.setPath("/okm:root"); // some specific path
I suggest reading the table at the top in this documentation section
https://docs.openkm.com/kcenter/view/ok ... earch.html what explain how QueryParam should be initialized for filtering.
Re: How to utilize queryparams
PostPosted:Sun Jul 01, 2018 8:18 am
by jorseng
Dear Jllort,
Thanks for the info!