Page 1 of 1

How to find Path of each document using sql

PostPosted:Tue Jan 07, 2020 6:34 am
by mamad
Hi guys

I want to build a view of documents which contains their name,uuid and path (my database is mysql 5.5)
I don't know why NBS_PATH is empty for each node at OKM_NDOE_BASE table and i think i have to build the path by myself based on the NBS_UUID and NBS_PARENT of each node.

I have written an stored procedure which find the path of each document based on its uuid but as i need a view , i cant use it.
Is there any way to build this view in mysql 5.5 ?

(im using openkm 6.3 community edition)

Re: How to find Path of each document using sql

PostPosted:Wed Jan 08, 2020 8:24 am
by jllort
Because store path in the database is a bad idea and by default we have it disabled. If you want to enable you have a configuration parameter named store.node.path ( https://docs.openkm.com/kcenter/view/ok ... eters.html )

Reason why not use it? well imagine you have a folder named /okm:root/test into what you have 50K files and nodes into, that means you have 50K database records what starts with /okm:root/test -> when you rename the folder to /okm:root/test to /okm:root/test_renamed must change 50K nodes, it means not only a database change ( simple update ) it means lucene indexes update and for it the application must follow the 50K records from API and rename it. At the end it means a lot of time for updating all the related nodes because a simple rename

Re: How to find Path of each document using sql

PostPosted:Wed Jan 08, 2020 6:21 pm
by mamad
Your reason convinced me completely !
Thanks a lot