Clearing the index

This is a discussion on Clearing the index within the Apache forums in Application Servers & Tools category; 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...

Go Back   Application Development Forum > Application Servers & Tools > Apache

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-21-2008, 03:30 PM
Jared Graber
Guest
 
Default Clearing the index

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


Reply With Quote
  #2  
Old 07-21-2008, 05:24 PM
Alexander Klimetschek
Guest
 
Default 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 <jared.graber@iaccap.com> 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
alexander.klimetschek@day.com

Reply With Quote
  #3  
Old 07-22-2008, 10:44 AM
Jared Graber
Guest
 
Default RE: Clearing the index

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:aklimets@day.com]
Sent: Monday, July 21, 2008 5:25 PM
To: users@jackrabbit.apache.org
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 <jared.graber@iaccap.com>
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
alexander.klimetschek@day.com

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:10 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.