Page 1 of 1

PropertiesPlugin with Metadata in findByQuery

PostPosted:Thu Aug 12, 2021 1:11 pm
by rmdd
Hello,

As the standard return from findByQuery contains lots of things and metadata are missing, i see that we can implement and deploy a serverside plugin.
https://docs.openkm.com/kcenter/view/sd ... indByQuery

This plugin need to implements NodeProperties. I have found this example :

https://docs.openkm.com/kcenter/view/ok ... cts-).html

As this example is very basic and the javadoc https://docs.openkm.com/apidoc/pro/okm/7.1/7.1.25/ doesn't match the example, my questions are :

Is it possible to set the metadata in the Document sent by
Code: Select all
@Override
    public Document getProperties(String user, NodeDocument nDocument, String linkTarget) throws PathNotFoundException, DatabaseException, RepositoryException {
        Document node = new Document();
        node.setUuid(nDocument.getUuid());

node.setXXX(metadatas) ?

        return node;
    }
?

and how can i set the openkm artifact in the pom.xml ? sdk4j works but doesn't contain the classes needed to create the plugin
Code: Select all
 <dependency>
    <groupId>com.openkm</groupId>
    <artifactId>openkm</artifactId>
    <version>6.4.54</version>
 </dependency>
thanks in advance

Re: PropertiesPlugin with Metadata in findByQuery

PostPosted:Sat Aug 14, 2021 7:32 am
by jllort
This documentation is not applicable to community edition, this feature currently is only implemented in professional edition.

In this kind of scenario it is better implement your own method to get just the data you need ( maybe by database directly without going across the lucene search engine ) -> database query will require less changes in code it is the easiest but may be not the best -> with a more detailed description of the problem are trying to solve I will be able to do better suggestions.

Re: PropertiesPlugin with Metadata in findByQuery

PostPosted:Tue Mar 29, 2022 12:57 pm
by RevGlue
Thanks, I solved it.

Re: PropertiesPlugin with Metadata in findByQuery

PostPosted:Fri Jul 28, 2023 7:53 am
by on-off
Hello !

Please. Can you share your solution with we ?

Thanks

Re: PropertiesPlugin with Metadata in findByQuery

PostPosted:Mon Jul 31, 2023 2:22 pm
by jllort
Hi on-off, as I explained in my previous reply, this plugin only works in the professional edition and does not have sense in the CE because this behavior is not implemented there. You should update the code for its purpose.

Re: PropertiesPlugin with Metadata in findByQuery

PostPosted:Tue Aug 01, 2023 6:50 am
by on-off
Thanks, @jilort.

I was asking @RevGlue. He says he solved it.