I found a way to do it automatically without duplicating configuration (in case anyone is interested):
Extend from SearchIndex and override the doInit method (update the repository and workspace configuration accordingly). Delete/Rename the index directories (specified by the path variable) and then call super.doInit. If the files are missing, the index files will be recreated. Note: This will only work on startup of the app. If anyone sees a flaw in this, let me know. -Jared -----Original Message----- From: Alexander Klimetschek [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2008 5:25 PM To: [email protected] Subject: Re: Clearing the index No, there is no configuration or API for deleting the index. But it's a simple "rm -rf <workspace-path>/index". Regards, Alex On Mon, Jul 21, 2008 at 9:30 PM, Jared Graber <[EMAIL PROTECTED]> wrote: > Is it possible to configure jackrabbit to reindex the repository at > startup? > > > > I know I could force this to happen by deleting the index files, but I > would prefer not to do this manually or add more duplicate configuration > to my application. I use an in memory repository that I import data > into, but the data in the old index is still around. > > > > If all else fails, I'll have to duplicate some configuration and delete > the files before I start the repo. > > > > Thanks, > > > > Jared > > -- Alexander Klimetschek [EMAIL PROTECTED]
