Graham: I've been using you indexing patch now for some months with a lot of success!! Thank you!
Now, I'm trying to upgrade to version 1.4.2 and I'm finding it difficult merge the changes in DSQuery.java and DSIndexer.java with your patch. Would you happen to have a patch that works on version 1.4.2? Many thanks! Jose -----Original Message----- From: Graham Triggs [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 2:22 PM To: Jose Blanco Cc: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] Reindexing vs Tomcat running Jose, That depends on what you want to do the test for - and what platform you are running under. When running offline, the createIndex method (actually, the new overloaded version that takes a second parameter - more on that later), directly calls moveIndex(). So, to stop an offline indexer from moving the directory, you need to comment that call out (the offline indexer can only move the index if the destination isn't locked - ie. you are not running under Windows, or you don't have an IndexSearcher open). moveAlternateIndex() is actually used by DSQuery, and is the method by which the web application moves the index from search.dir.create. This method actually has the additional check for the existence of a 'dspace-index-complete' file, which is used to stop an already running web application from attempting to move the new index before it has finished being built. So, to stop a running web application from moving the index, you need to comment out the call to moveIndex() here. To stop both offline and web applications from moving the index, you therefore have to comment out both calls to moveIndex(). Or perhaps more easily, just make moveIndex() return without doing anything. However, as I mentioned, createIndex has an overloaded version with an additional parameter - a boolean flag that states whether this index is to be used only for testing purposes. If you call createIndex with this flag set to true, then it will ignore search.dir.create (if it has been set), and attempt to create an index in the directory specified by the environment variable java.io.tmpdir. So, you could extend the main method of the application you are using to call createIndex in this fashion. Note that by default, when specifying this is a test index, it will also delete the index directly after building it. If you need the index to remain after the execution of the program, you would need to comment out the appropriate call to deleteDirs() from the createIndex() method. G ----- Original Message ----- From: "Jose Blanco" <[EMAIL PROTECTED]> To: "'Graham Triggs'" <[EMAIL PROTECTED]> Cc: <dspace-tech@lists.sourceforge.net> Sent: Wednesday, February 14, 2007 5:41 PM Subject: RE: [Dspace-tech] Reindexing vs Tomcat running > Graham: > > Your new patch completes successfully. Now I would like to make a change > to > it. I would like it NOT to copy from search.dir.create to search.dir. I > want to do this just for testing purposes. So I think in order to do > this, > I need to change the DSIndexer.java file. I believe if I > > Comment out > > return DSIndexer.moveIndex(c, offlineIndexDir, toPath); > > in the routine moveAlternateIndex, and just > > return false; > > That should do it, right? > > I don't think this will break anything. I simply want to see what goes on > (resource being used) when the indexer is running, but I don't want it to > replace the active one being used by DSpace. > > Thanks! > > Jose > > -----Original Message----- > From: Graham Triggs [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 14, 2007 5:52 AM > To: Jose Blanco > Cc: dspace-tech@lists.sourceforge.net > Subject: RE: [Dspace-tech] Reindexing vs Tomcat running > > Jose, > > I've just uploaded what should be my final revision of this patch. It > incorporates a couple of additional small fixes: > > 1) If somebody is logged into a console and are 'in' the search > directory, it no longer stops the index replacement from happening > > 2) Minor structural improvements to the code. > > I've now tested just about every scenario that I can think of occurring > for which it is possible to fabricate a test case for, on both Linux and > Windows platforms, including with multiple Tomcat instances running. > > As before, let me know how you get on. > > G > > On Mon, 2007-02-12 at 17:06 -0500, Jose Blanco wrote: >> Graham: >> >> I installed you patch in my dev area, and I see that search.dir.create >> has >> the new indexes but it did not seem to copy it over to the search.dir > area. >> I don't see anything in the log file about failing to copy it over. I'm >> assuming that I have something open as you indicate in the "caveats" > section >> of your patch, but would I get some sort of message on the log file? >> >> Thanks! >> >> Jose >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> [EMAIL PROTECTED] >> Sent: Thursday, February 08, 2007 5:29 PM >> To: dspace-tech@lists.sourceforge.net >> Subject: Re: [Dspace-tech] Reindexing vs Tomcat running >> >> Stephane, >> >> I've now submitted a patch for this reindexing issue: #1655583 >> >> You can read my notes and download the patch file here: >> >> > https://sourceforge.net/tracker/?func=detail&atid=319984&aid=1655583&group_i >> d=19984 >> >> With the patch applied, you will also need to add a 'search.dir.create' >> entry to your dspace.cfg as per the comments. >> >> Let me know if you have any questions. >> >> G >> >> ------ >> Graham Triggs >> Technical Architect >> Open Repository >> +44 (0)20 7631 9942 >> This email has been scanned by Postini. >> For more information please visit http://www.postini.com >> >> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier. >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> DSpace-tech mailing list >> DSpace-tech@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/dspace-tech >> >> >> > > > > This email has been scanned by Postini. For more information please visit http://www.postini.com ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech