You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/09/13 20:48:42 UTC

svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Author: mikemccand
Date: Sat Sep 13 18:48:41 2014
New Revision: 1624773

URL: http://svn.apache.org/r1624773
Log:
detect invalid major version when writing .si

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java?rev=1624773&r1=1624772&r2=1624773&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java Sat Sep 13 18:48:41 2014
@@ -28,6 +28,7 @@ import org.apache.lucene.store.Directory
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.util.IOUtils;
+import org.apache.lucene.util.Version;
 
 /**
  * Lucene 4.0 implementation of {@link SegmentInfoWriter}.
@@ -52,8 +53,12 @@ public class Lucene46SegmentInfoWriter e
     boolean success = false;
     try {
       CodecUtil.writeHeader(output, Lucene46SegmentInfoFormat.CODEC_NAME, Lucene46SegmentInfoFormat.VERSION_CURRENT);
+      Version version = si.getVersion();
+      if (version.major < 3 || version.major > 4) {
+        throw new IllegalArgumentException("invalid major version: should be 3 or 4 but got: " + version.major + " segment=" + si);
+      }
       // Write the Lucene version that created this segment, since 3.1
-      output.writeString(si.getVersion().toString());
+      output.writeString(version.toString());
       output.writeInt(si.getDocCount());
 
       output.writeByte((byte) (si.getUseCompoundFile() ? SegmentInfo.YES : SegmentInfo.NO));



Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Posted by Michael McCandless <lu...@mikemccandless.com>.
I'll open an issue for this; I think it should block 4.10.1.

Mike McCandless

http://blog.mikemccandless.com

On Sun, Sep 14, 2014 at 8:21 AM, Robert Muir <rc...@gmail.com> wrote:
> Also if there are going to be checks against this, if its really going
> to become the primary entry point for deciding the version of a
> segment and what exception to throw and so on, then I strongly
> disagree with string encoding.
>
> In my opinion we already have such a scheme figured out (CodecUtil
> methods) with exception handling and everything...
>
> On Sun, Sep 14, 2014 at 7:58 AM, Robert Muir <rc...@gmail.com> wrote:
>> I agree, can we remove all the checks here? They are bogus in a few ways:
>>
>> 1. Version.parse claims its forwards compatible, but the ctor throws
>> these exceptions.
>> 2. These exceptions are thrown without indicating what the actual value was.
>> 3. These exceptions are thrown with no context (the toString of the
>> input file itself).
>>
>> So, I don't think Version should do these checks, at least, if it
>> wants to do them, it needs to step up to the plate and do them
>> correctly.
>>
>> On Sun, Sep 14, 2014 at 7:19 AM, Uwe Schindler <uw...@thetaphi.de> wrote:
>>> Especially, as I said in my previous email: ist in my opinion bad to throw IllegalArgumentException on version's parse if it is a vlaid version.
>>>
>>> I tried it locally and created an Index with version 6.0 written to disk (I hacked it). If I try top open it with IndexReader of Lucene 4, so it should throw IndexTooNewException! But in fact it did not, because Version.parse() failed earlier! So we are inconsistent with Exceptions! It should in fact really throw IndexFormatTooNewException!
>>>
>>> In my opinion, the bounds checks in the Version ctor should be "optional", so when parsing versions from index files we have a chance to throw the "correct exception".
>>>
>>> Uwe
>>>
>>> -----
>>> Uwe Schindler
>>> H.-H.-Meier-Allee 63, D-28213 Bremen
>>> http://www.thetaphi.de
>>> eMail: uwe@thetaphi.de
>>>
>>>
>>>> -----Original Message-----
>>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>>> Sent: Sunday, September 14, 2014 12:46 PM
>>>> To: Lucene/Solr dev
>>>> Subject: Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./
>>>> lucene/ lucene/core/
>>>> lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46Segme
>>>> ntInfoWriter.java
>>>>
>>>> On Sat, Sep 13, 2014 at 10:23 PM, Ryan Ernst <ry...@iernst.net> wrote:
>>>> > How would the Version be constructed with an invalid major version,
>>>> > given this exact check in the constructor (and the fact that the only
>>>> > way to construct is through Version.parse)?
>>>>
>>>> I think it makes sense to be defensive here and have the check in two places.
>>>>
>>>> This also guards against any future changes to Version that somehow allow
>>>> this ... it sure look like Version can't ever be created in an "out of bounds"
>>>> state today, but who knows tomorrow ...
>>>>
>>>> Mike McCandless
>>>>
>>>> http://blog.mikemccandless.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
>>>> commands, e-mail: dev-help@lucene.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: dev-help@lucene.apache.org
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

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


Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Posted by Robert Muir <rc...@gmail.com>.
Also if there are going to be checks against this, if its really going
to become the primary entry point for deciding the version of a
segment and what exception to throw and so on, then I strongly
disagree with string encoding.

In my opinion we already have such a scheme figured out (CodecUtil
methods) with exception handling and everything...

On Sun, Sep 14, 2014 at 7:58 AM, Robert Muir <rc...@gmail.com> wrote:
> I agree, can we remove all the checks here? They are bogus in a few ways:
>
> 1. Version.parse claims its forwards compatible, but the ctor throws
> these exceptions.
> 2. These exceptions are thrown without indicating what the actual value was.
> 3. These exceptions are thrown with no context (the toString of the
> input file itself).
>
> So, I don't think Version should do these checks, at least, if it
> wants to do them, it needs to step up to the plate and do them
> correctly.
>
> On Sun, Sep 14, 2014 at 7:19 AM, Uwe Schindler <uw...@thetaphi.de> wrote:
>> Especially, as I said in my previous email: ist in my opinion bad to throw IllegalArgumentException on version's parse if it is a vlaid version.
>>
>> I tried it locally and created an Index with version 6.0 written to disk (I hacked it). If I try top open it with IndexReader of Lucene 4, so it should throw IndexTooNewException! But in fact it did not, because Version.parse() failed earlier! So we are inconsistent with Exceptions! It should in fact really throw IndexFormatTooNewException!
>>
>> In my opinion, the bounds checks in the Version ctor should be "optional", so when parsing versions from index files we have a chance to throw the "correct exception".
>>
>> Uwe
>>
>> -----
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: uwe@thetaphi.de
>>
>>
>>> -----Original Message-----
>>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>>> Sent: Sunday, September 14, 2014 12:46 PM
>>> To: Lucene/Solr dev
>>> Subject: Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./
>>> lucene/ lucene/core/
>>> lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46Segme
>>> ntInfoWriter.java
>>>
>>> On Sat, Sep 13, 2014 at 10:23 PM, Ryan Ernst <ry...@iernst.net> wrote:
>>> > How would the Version be constructed with an invalid major version,
>>> > given this exact check in the constructor (and the fact that the only
>>> > way to construct is through Version.parse)?
>>>
>>> I think it makes sense to be defensive here and have the check in two places.
>>>
>>> This also guards against any future changes to Version that somehow allow
>>> this ... it sure look like Version can't ever be created in an "out of bounds"
>>> state today, but who knows tomorrow ...
>>>
>>> Mike McCandless
>>>
>>> http://blog.mikemccandless.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
>>> commands, e-mail: dev-help@lucene.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>

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


Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Posted by Robert Muir <rc...@gmail.com>.
I agree, can we remove all the checks here? They are bogus in a few ways:

1. Version.parse claims its forwards compatible, but the ctor throws
these exceptions.
2. These exceptions are thrown without indicating what the actual value was.
3. These exceptions are thrown with no context (the toString of the
input file itself).

So, I don't think Version should do these checks, at least, if it
wants to do them, it needs to step up to the plate and do them
correctly.

On Sun, Sep 14, 2014 at 7:19 AM, Uwe Schindler <uw...@thetaphi.de> wrote:
> Especially, as I said in my previous email: ist in my opinion bad to throw IllegalArgumentException on version's parse if it is a vlaid version.
>
> I tried it locally and created an Index with version 6.0 written to disk (I hacked it). If I try top open it with IndexReader of Lucene 4, so it should throw IndexTooNewException! But in fact it did not, because Version.parse() failed earlier! So we are inconsistent with Exceptions! It should in fact really throw IndexFormatTooNewException!
>
> In my opinion, the bounds checks in the Version ctor should be "optional", so when parsing versions from index files we have a chance to throw the "correct exception".
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
>> -----Original Message-----
>> From: Michael McCandless [mailto:lucene@mikemccandless.com]
>> Sent: Sunday, September 14, 2014 12:46 PM
>> To: Lucene/Solr dev
>> Subject: Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./
>> lucene/ lucene/core/
>> lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46Segme
>> ntInfoWriter.java
>>
>> On Sat, Sep 13, 2014 at 10:23 PM, Ryan Ernst <ry...@iernst.net> wrote:
>> > How would the Version be constructed with an invalid major version,
>> > given this exact check in the constructor (and the fact that the only
>> > way to construct is through Version.parse)?
>>
>> I think it makes sense to be defensive here and have the check in two places.
>>
>> This also guards against any future changes to Version that somehow allow
>> this ... it sure look like Version can't ever be created in an "out of bounds"
>> state today, but who knows tomorrow ...
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
>> commands, e-mail: dev-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

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


RE: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Posted by Uwe Schindler <uw...@thetaphi.de>.
Especially, as I said in my previous email: ist in my opinion bad to throw IllegalArgumentException on version's parse if it is a vlaid version.

I tried it locally and created an Index with version 6.0 written to disk (I hacked it). If I try top open it with IndexReader of Lucene 4, so it should throw IndexTooNewException! But in fact it did not, because Version.parse() failed earlier! So we are inconsistent with Exceptions! It should in fact really throw IndexFormatTooNewException!

In my opinion, the bounds checks in the Version ctor should be "optional", so when parsing versions from index files we have a chance to throw the "correct exception".

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: Sunday, September 14, 2014 12:46 PM
> To: Lucene/Solr dev
> Subject: Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./
> lucene/ lucene/core/
> lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46Segme
> ntInfoWriter.java
> 
> On Sat, Sep 13, 2014 at 10:23 PM, Ryan Ernst <ry...@iernst.net> wrote:
> > How would the Version be constructed with an invalid major version,
> > given this exact check in the constructor (and the fact that the only
> > way to construct is through Version.parse)?
> 
> I think it makes sense to be defensive here and have the check in two places.
> 
> This also guards against any future changes to Version that somehow allow
> this ... it sure look like Version can't ever be created in an "out of bounds"
> state today, but who knows tomorrow ...
> 
> Mike McCandless
> 
> http://blog.mikemccandless.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


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


Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Posted by Michael McCandless <lu...@mikemccandless.com>.
On Sat, Sep 13, 2014 at 10:23 PM, Ryan Ernst <ry...@iernst.net> wrote:
> How would the Version be constructed with an invalid major version, given
> this exact check in the constructor (and the fact that the only way to
> construct is through Version.parse)?

I think it makes sense to be defensive here and have the check in two places.

This also guards against any future changes to Version that somehow
allow this ... it sure look like Version can't ever be created in an
"out of bounds" state today, but who knows tomorrow ...

Mike McCandless

http://blog.mikemccandless.com

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


RE: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

 

I am not sure, if the hard checks in the ctor are future-proof: Currently we detect versions < 3.0 early when reading segments, because they have some signatures that identify them as 3.x or earlier, so we can “correctly” throw IndexFormatTooOldException (because we never try to parse a version). If we later (e.g. in version 5 or 6) drop support for those older versions, how can we correctly throw “IndexFormatTooOldException”, if the parsing of a version written to segment fails with IAE during parsing? In addition, we can never throw IndexFormatTooNewException, if we get (some time in the future) with the current 4.10 version - as released last month - such an value in a future index file. The user would get an exception, but the wrong one.

 

Therefore, I would not restrict versions soo much in the ctor. Ideally we would throw the IndexFormatTooOld/New in ctor already (but it is an IOException, so it does fit the use-case to be thrown while parsing).

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

 <http://www.thetaphi.de/> http://www.thetaphi.de

eMail: uwe@thetaphi.de

 

From: Ryan Ernst [mailto:ryan@iernst.net] 
Sent: Sunday, September 14, 2014 4:24 AM
To: dev@lucene.apache.org
Subject: Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

 

How would the Version be constructed with an invalid major version, given this exact check in the constructor (and the fact that the only way to construct is through Version.parse)?

 

On Sat, Sep 13, 2014 at 11:48 AM, <mi...@apache.org> wrote:

Author: mikemccand
Date: Sat Sep 13 18:48:41 2014
New Revision: 1624773

URL: http://svn.apache.org/r1624773
Log:
detect invalid major version when writing .si

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java?rev=1624773 <http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java?rev=1624773&r1=1624772&r2=1624773&view=diff> &r1=1624772&r2=1624773&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java Sat Sep 13 18:48:41 2014
@@ -28,6 +28,7 @@ import org.apache.lucene.store.Directory
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.util.IOUtils;
+import org.apache.lucene.util.Version;

 /**
  * Lucene 4.0 implementation of {@link SegmentInfoWriter}.
@@ -52,8 +53,12 @@ public class Lucene46SegmentInfoWriter e
     boolean success = false;
     try {
       CodecUtil.writeHeader(output, Lucene46SegmentInfoFormat.CODEC_NAME, Lucene46SegmentInfoFormat.VERSION_CURRENT);
+      Version version = si.getVersion();
+      if (version.major < 3 || version.major > 4) {
+        throw new IllegalArgumentException("invalid major version: should be 3 or 4 but got: " + version.major + " segment=" + si);
+      }
       // Write the Lucene version that created this segment, since 3.1
-      output.writeString(si.getVersion().toString());
+      output.writeString(version.toString());
       output.writeInt(si.getDocCount());

       output.writeByte((byte) (si.getUseCompoundFile() ? SegmentInfo.YES : SegmentInfo.NO));



 


Re: svn commit: r1624773 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java

Posted by Ryan Ernst <ry...@iernst.net>.
How would the Version be constructed with an invalid major version, given
this exact check in the constructor (and the fact that the only way to
construct is through Version.parse)?

On Sat, Sep 13, 2014 at 11:48 AM, <mi...@apache.org> wrote:

> Author: mikemccand
> Date: Sat Sep 13 18:48:41 2014
> New Revision: 1624773
>
> URL: http://svn.apache.org/r1624773
> Log:
> detect invalid major version when writing .si
>
> Modified:
>     lucene/dev/branches/branch_4x/   (props changed)
>     lucene/dev/branches/branch_4x/lucene/   (props changed)
>     lucene/dev/branches/branch_4x/lucene/core/   (props changed)
>
> lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java
>
> Modified:
> lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java
> URL:
> http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java?rev=1624773&r1=1624772&r2=1624773&view=diff
>
> ==============================================================================
> ---
> lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java
> (original)
> +++
> lucene/dev/branches/branch_4x/lucene/core/src/java/org/apache/lucene/codecs/lucene46/Lucene46SegmentInfoWriter.java
> Sat Sep 13 18:48:41 2014
> @@ -28,6 +28,7 @@ import org.apache.lucene.store.Directory
>  import org.apache.lucene.store.IOContext;
>  import org.apache.lucene.store.IndexOutput;
>  import org.apache.lucene.util.IOUtils;
> +import org.apache.lucene.util.Version;
>
>  /**
>   * Lucene 4.0 implementation of {@link SegmentInfoWriter}.
> @@ -52,8 +53,12 @@ public class Lucene46SegmentInfoWriter e
>      boolean success = false;
>      try {
>        CodecUtil.writeHeader(output, Lucene46SegmentInfoFormat.CODEC_NAME,
> Lucene46SegmentInfoFormat.VERSION_CURRENT);
> +      Version version = si.getVersion();
> +      if (version.major < 3 || version.major > 4) {
> +        throw new IllegalArgumentException("invalid major version: should
> be 3 or 4 but got: " + version.major + " segment=" + si);
> +      }
>        // Write the Lucene version that created this segment, since 3.1
> -      output.writeString(si.getVersion().toString());
> +      output.writeString(version.toString());
>        output.writeInt(si.getDocCount());
>
>        output.writeByte((byte) (si.getUseCompoundFile() ? SegmentInfo.YES
> : SegmentInfo.NO));
>
>
>