Skip to content

Instantly share code, notes, and snippets.

@yesil
Created June 10, 2016 15:39
Show Gist options
  • Save yesil/2a391a13aa325055e6e3f3bb46cc0b4c to your computer and use it in GitHub Desktop.
Save yesil/2a391a13aa325055e6e3f3bb46cc0b4c to your computer and use it in GitHub Desktop.
import org.apache.jackrabbit.oak.spi.commit.CommitInfo
import org.apache.jackrabbit.oak.spi.commit.EmptyHook
def removeLucene(session, index) {
def rootB = session.store.root.builder()
def luceneIndex = rootB.getChildNode("oak:index").getChildNode(index)
println luceneIndex.remove() ? "success" : "error"
session.store.merge(rootB, EmptyHook.INSTANCE, CommitInfo.EMPTY)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment