Thanks Jörg, I've tried but I've noticed one strange thing, myabe strange...
My DocumentNodeStore is on mongodb, so using a client like Compass I sometimes explore the nodes collection, and I've seen that after the oak:index/my-index node deletion there were not disappeared all the mongo documents below the deleted document, is it possible in your opinion? I would like only to be sure that the deletion of an index definition corresponds also to the deletion of the whole index content, either the definition or the indexed data. I hope it's clear my objective, thanks Cordiali saluti / Best regards, Raffaele Gambelli Application Architect ________________________________ From: Jörg Hoh via oak-dev <[email protected]> Sent: Wednesday, October 7, 2026 5:48 PM To: [email protected] <[email protected]> Cc: Jörg Hoh <[email protected]> Subject: Re: How delete programmatically a Lucene index? Hi Raffaele, Oak index definitions are regular JCR nodes below /oak:index (default), so you can use the standard JCR Node API to create, modify and delete them. The only thing I would recommend is to make sure that you do all your index modifications within a single session and then do a final commit; otherwise (spreading your index operations over multiple commis) you might end up with multiple concurrent operations on the indexes, which potentially can impact each other. Jörg Am Mi., 7. Okt. 2026 um 11:28 Uhr schrieb Raffaele Gambelli via oak-dev < [email protected]>: > Hi all, > > in my application I would like to introduce an API to provide the feature > of deleting a Lucene Index previously created. > > Could you tell me which should be the oak api to use? > > Thank you > > Cordiali saluti / Best regards, > > Raffaele Gambelli > Application Architect > E [email protected]<mailto:[email protected]> > M +39 3371641888 <+39%20337%20164%201888> > [ > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fimages.eu.signature365.com%2Fb2uknhefs98nwdub%2Fimg_USamABop1MkXu35s%2Fv114.jpg&data=05%7C02%7CRaffaele.Gambelli%40cegeka.com%7Ce0bac4de2b5046f0cb4008df248a7041%7C42151053019347aa9e81effd81f772cc%7C0%7C0%7C639269849139057714%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=iWT7xvy%2BEyhNg4Hnq4Il2PdKbeYgPXdJZ%2B%2BAUoigWCY%3D&reserved=0<https://images.eu.signature365.com/b2uknhefs98nwdub/img_USamABop1MkXu35s/v114.jpg> > ] > [CEGEKA] > Via Ettore Cristoni, 84 > IT-40033 Bologna (IT), Italy > T +39 02 2544271 <+39%2002%20254%204271> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cegeka.com%2F&data=05%7C02%7CRaffaele.Gambelli%40cegeka.com%7Ce0bac4de2b5046f0cb4008df248a7041%7C42151053019347aa9e81effd81f772cc%7C0%7C0%7C639269849139079158%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=J2GTt8tAAM%2Fa65RyR15kIqFbQhSaI4hbj%2BEHuej4hCQ%3D&reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.cegeka.com%2F&data=05%7C02%7CRaffaele.Gambelli%40cegeka.com%7Ce0bac4de2b5046f0cb4008df248a7041%7C42151053019347aa9e81effd81f772cc%7C0%7C0%7C639269849139092067%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=qnsdc7p%2FJ6ar2r6JK3xjikbBw%2FNmmS3z0FxbLnv78gQ%3D&reserved=0><http://www.cegeka.com/> > > > > > -- https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcqdump.joerghoh.de%2F&data=05%7C02%7CRaffaele.Gambelli%40cegeka.com%7Ce0bac4de2b5046f0cb4008df248a7041%7C42151053019347aa9e81effd81f772cc%7C0%7C0%7C639269849139105348%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=QF%2BNOcVxbDTOl4dbh5HOQJJ6KV%2FAOTUMnsB0dEZ9gwM%3D&reserved=0<https://cqdump.joerghoh.de/>
