• Clear Keywords

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #21097  by chackem
 
Is there a way in Beanshell to clear ALL the keywords for a given node at one time? I've figured out how to add and remove a keyword one at a time, but I assume there is a way to do this in one method call? I'd like to do the same for categories, but I assume the one will show me how to do the other.

Thanks.
 #21105  by jllort
 
To add keyword should be used: OKMProperty.getInstance().addKeyword(null, path, keyword);
To add category should be used: OKMProperty.getInstance().addCategory(null, path, category);
Take a look here for involved class http://doxygen.openkm.com/6.2.x/da/d9f/ ... perty.html

Take a look here for more information : http://doxygen.openkm.com/6.2.x/

If you make some script and you want to share with comunity users tell us and we'll publicate in wiki Utilities section.
 #21108  by chackem
 
I'm planning on making my project available once it's complete.

I've figured out how to do those one at a time. I was wondering if there was a way to remove ALL of the keywords at one time, without having to call the function x number of times. If not, it's no big deal. Just looking for the most efficient way possible.

Thanks.
 #21130  by jllort
 
If you make a query you can see where keywords are stored:
Code: Select all
SELECT * FROM OKM_NODE_KEYWORD;
Actually api not support any method to clean all keywords at one call, the low level implementation is available at DbPropertyModule.java, obviously can be implemented but I think is not a normal use from UI clean all keywords of a word. The same can be applied with categories. Try to justify the need of it, and then if there's some scenario that really needs it we can implement it.

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.