• How to utilize queryparams

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #46226  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.
 #46240  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.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.