Package org.apache.lucene.index
Class IndexFormatTooOldException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.lucene.index.IndexFormatTooOldException
- All Implemented Interfaces:
Serializable
This exception is thrown when Lucene detects an index that is too old for this Lucene version
- See Also:
-
Constructor Summary
ConstructorDescriptionIndexFormatTooOldException
(String resourceDescription, int version, int minVersion, int maxVersion) Creates anIndexFormatTooOldException
.IndexFormatTooOldException
(String resourceDescription, String reason) Creates anIndexFormatTooOldException
.IndexFormatTooOldException
(DataInput in, int version, int minVersion, int maxVersion) Creates anIndexFormatTooOldException
.IndexFormatTooOldException
(DataInput in, String reason) Creates anIndexFormatTooOldException
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the maximum version accepted.Returns the minimum version accepted This method will returnnull
if an alternativegetReason()
is provided.Returns an optional reason for this exception if the version information was not available.Returns a description of the file that was too oldReturns the version of the file that was too old.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IndexFormatTooOldException
Creates anIndexFormatTooOldException
.- Parameters:
resourceDescription
- describes the file that was too oldreason
- the reason for this exception if the version is not available- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
IndexFormatTooOldException
Creates anIndexFormatTooOldException
.- Parameters:
in
- the open file that's too oldreason
- the reason for this exception if the version is not available- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
IndexFormatTooOldException
public IndexFormatTooOldException(String resourceDescription, int version, int minVersion, int maxVersion) Creates anIndexFormatTooOldException
.- Parameters:
resourceDescription
- describes the file that was too oldversion
- the version of the file that was too oldminVersion
- the minimum version acceptedmaxVersion
- the maximum version accepted- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
IndexFormatTooOldException
Creates anIndexFormatTooOldException
.- Parameters:
in
- the open file that's too oldversion
- the version of the file that was too oldminVersion
- the minimum version acceptedmaxVersion
- the maximum version accepted- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Method Details
-
getResourceDescription
Returns a description of the file that was too old -
getReason
Returns an optional reason for this exception if the version information was not available. Otherwisenull
-
getVersion
Returns the version of the file that was too old. This method will returnnull
if an alternativegetReason()
is provided. -
getMaxVersion
Returns the maximum version accepted. This method will returnnull
if an alternativegetReason()
is provided. -
getMinVersion
Returns the minimum version accepted This method will returnnull
if an alternativegetReason()
is provided.
-