lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Williams" <ch...@manawiz.com>
Subject RE: Is there an easy way to have indexing ignore a CVS subdirectory in the index directory?
Date Fri, 05 Nov 2004 17:03:00 GMT
Sergiu,

The Lucene index is not in CVS -- neither the directory nor the files.
But it is a subdirectory of a directory that is in CVS, and it needs to
be structured that way due to the directory structure constraints of
Tomcat and the way Netbeans automates Tomcat app development and
deployment (which uses a development directory layout that directly
parallels the Tomcat runtime layout).  I want to be able to Update the
entire repository to make sure I've got all of the latest changes, which
means doing CVS Update on an ancestor directory of the Lucene index
directory.  Even though the index directory is not in CVS, doing the
update on the ancestor directory consistently causes CVS to insert a CVS
subdirectory into the index directory, causing the problem.  Both WinCVS
and the Netbeans CVS client have this same behavior.  I have not been
able to find any option to stop this -- do you know of one?

Also, I can't just move the CVS directory out of the index directory,
unless I'm very careful to move it back before every CVS Update.  For
similar reasons I can't just delete it either.  CVS (and Netbeans) get
very upset if there are points to this directory but it isn't there.
The pointer exists in the CVS Entries file (and another for Netbeans in
a cache file) in the CVS subdirectory of the parent directory of the
index directory.  So, I have to manually eliminate those if I want to
delete the index directory's CVS directory.  And then they come back
after the next update!  All in all very frustrating.

I'm going to try the code patch that Otis suggested.  If anybody knows
some way in CVS to avoid this problem, I'd love to hear about it.

Thanks,

Chuck

  > -----Original Message-----
  > From: sergiu gordea [mailto:gsergiu@ifit.uni-klu.ac.at]
  > Sent: Friday, November 05, 2004 1:43 AM
  > To: Lucene Users List
  > Subject: Re: Is there an easy way to have indexing ignore a CVS
  > subdirectory in the index directory?
  > 
  > Chuck Williams wrote:
  > 
  > >Otis, thanks for looking at this.  The stack trace of the exception
is
  > >below.  I looked at the code.  It wants to delete every file in the
  > >index directory, but fails to delete the CVS subdirectory entry
  > >(presumably because it is marked read-only; the specific exception
is
  > >swallowed).  Even if it could delete the CVS subdirectory, this
would
  > >just cause another problem with Netbeans/CVS, since it wouldn't
know
  > how
  > >to fix up the pointers in the parent CVS subdirectory.  Is there a
  > >change I could make that would cause it to safely leave this alone?
  > >
  > >
  > Why do you have the lucene index in CVS? From what I know the lucene
  > index folder shouldn't contain any other folder,
  > just the lucene files.  I think it won't be any problem to delete
CVS
  > folder from lucene index and to remove the index from CVS.
  > If you are affraid to do that .. you can move the CVS subfolder from
  > lucene index into another folder ... and restore if you have any
  > problems. I'm sure you will have no problem ... but this is just for
  > your trust...
  > 
  >  Sergiu
  > 
  > >This problem only arises on a full index (incremental == false <=>
  > >create == true).  Incremental indexes work fine in my app.
  > >
  > >Chuck
  > >
  > >java.io.IOException: Cannot delete CVS
  > >    at
org.apache.lucene.store.FSDirectory.create(FSDirectory.java:144)
  > >    at
org.apache.lucene.store.FSDirectory.<init>(FSDirectory.java:128)
  > >    at
  >
>org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:102)
  > >    at
  >
>org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:83)
  > >    at
org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:173)
  > >    at [my app]...
  > >
  > >  > -----Original Message-----
  > >  > From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
  > >  > Sent: Thursday, November 04, 2004 1:54 PM
  > >  > To: Lucene Users List
  > >  > Subject: Re: Is there an easy way to have indexing ignore a CVS
  > >  > subdirectory in the index directory?
  > >  >
  > >  > Hm, as far as I know, a CVS sub-directory in an index directory
  > >should
  > >  > not bother Lucene.  As a matter of fact, I tested this (I used
a
  > >file,
  > >  > not a directory) for Lucene in Action.  What error are you
getting?
  > >  >
  > >  > I know there is -I CVS option for ignoring files; perhaps it
works
  > >with
  > >  > directories, too.
  > >  >
  > >  > Otis
  > >  >
  > >  >
  > >  > --- Chuck Williams <chuck@manawiz.com> wrote:
  > >  >
  > >  > > I have a Tomcat web module being developed with Netbeans 4.0
ide
  > >  > > using
  > >  > > CVS.  One CVS repository holds the sources of my various web
  > files
  > >in
  > >  > > a
  > >  > > directory structure that directly parallels the standard
Tomcat
  > >  > > webapp
  > >  > > directory structure.  This is well supported in a fully
automated
  > >way
  > >  > > within Netbeans.  I have my search index directory as a
  > >subdirectory
  > >  > > of
  > >  > > WEB-INF, which seemed the natural place to put it.  The index
  > >files
  > >  > > themselves are not in the repository.  I want to be able to
do
  > CVS
  > >  > > Update for the web module directory tree as a whole.
However,
  > >this
  > >  > > places a CVS subdirectory within the index directory, which
in
  > >turn
  > >  > > causes Lucene indexing to blow up the next time I run it
since
  > >this
  > >  > > is
  > >  > > an unexpected entry in the index directory.  To make things
works,
  > >to
  > >  > > work around the problem I both need to delete the CVS
  > subdirectory
  > >  > > and
  > >  > > find and delete the pointers to it in the Entries file and
  > >Netbeans
  > >  > > cache file within the CVS subdirectory of the parent
directory.
  > >This
  > >  > > is
  > >  > > annoying to say the least.
  > >  > >
  > >  > >
  > >  > >
  > >  > > I've asked the Netbeans users if there is a way to avoid
creation
  > >of
  > >  > > the
  > >  > > index's CVS subdirectory, but the same thing happened using
  > WinCVS
  > >  > > and I
  > >  > > so I expect this is not a Netbeans issue.  It could be my
  > relative
  > >  > > ignorance of CVS.
  > >  > >
  > >  > >
  > >  > >
  > >  > > How do others avoid this problem?
  > >  > >
  > >  > >
  > >  > >
  > >  > > Any advice or suggestions would be appreciated.
  > >  > >
  > >  > >
  > >  > >
  > >  > > Thanks,
  > >  > >
  > >  > >
  > >  > >
  > >  > > Chuck
  > >  > >
  > >  > >
  > >  > >
  > >  > >
  > >  >
  > >  >
  > >  >
  >
>---------------------------------------------------------------------
  > >  > To unsubscribe, e-mail:
lucene-user-unsubscribe@jakarta.apache.org
  > >  > For additional commands, e-mail: lucene-user-
  > help@jakarta.apache.org
  > >
  > >
  >
>---------------------------------------------------------------------
  > >To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
  > >For additional commands, e-mail:
lucene-user-help@jakarta.apache.org
  > >
  > >
  > >
  > 
  > 
  >
---------------------------------------------------------------------
  > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
  > For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message