lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Stoppelman" <stop...@gmail.com>
Subject Re: Lucene 2.0.0 index being zeroed out by Lucene 2.2.0.
Date Fri, 22 Jun 2007 02:03:14 GMT
Seems like the lucene 2.0.0 created a file <INDEX_DIR>/segments. In
2.2.0the new segments file has the following convention
<INDEX_DIR>/segments_<NUMBER>. Our codebase had some logic that depended on
this file being named consistently.
It seems like the bug was on my end, my apologies.

-M

On 6/21/07, Michael Stoppelman <stopman@gmail.com> wrote:
>
> Hi all,
>
> My index is being zeroed out by the new lucene core jar.
>
> Here's the deal:
> I've got an old index from lucene-core-2.0.0 jar. I start up my service
> with the new lucene 2.2.0 jar and everything
> is fine. When I add a document to the index the everything is still fine.
> Yet when I shut down my service and
> restart, lucene-core-2.2.0 clears out my index, poof index gone. I've
> looked into this a little, it seems that once
> I've added a new item to an old index I get two new files in the index
> directory that look like this:
>
> -rw-r--r--    1 stop     users          70 2007-06-21 17:29 segments_3
> -rw-r--r--    1 stop     users          20 2007-06-21 17:29 segments.gen
>
> If I copy in my old index into the index directory with these files
> present and start up my search service the old index
> will disappear.
>
> This means, if I startup with the following index directory (_1ssra is the
> old lucene 2.0.0 index):
> -rw-r--r--    1 stop     users          19 2007-06-21 17:29 _1ssra_1.del
> -rw-r--r--    1 stop     users    947083649 2007-06-21 17:25 _1ssra.cfs
> -rw-r--r--    1 stop     users       71253 2007-06-21 17:29 _1ssrb.cfs
> -rw-r--r--    1 stop     users          70 2007-06-21 17:29 segments_3
> -rw-r--r--    1 stop     users          20 2007-06-21 17:29 segments.gen
>
> I end up with these files left after startup:
> -rw-r--r--    1 stop     users          20 2007-06-21 17:30 segments_1
> -rw-r--r--    1 stop     users          20 2007-06-21 17:30 segments.gen
> -rw-r--r--    1 stop     users           0 2007-06-21 17:30 write.lock
>
> From the lucene website, it says "Adding to an index with an older format
> will cause it to be converted to the newer format."
> Has anyone else seen lucene-core-2.2.0.jar nuke your old index? Am I
> supposed to convert my index using a command-line tool?
>
> -M
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message