1 package org.apache.lucene.util;
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership.
7 * The ASF licenses this file to You under the Apache License, Version 2.0
8 * (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 * Use by certain classes to match version compatibility
23 * across releases of Lucene.
25 * <p><b>WARNING</b>: When changing the version parameter
26 * that you supply to components in Lucene, do not simply
27 * change the version at search-time, but instead also adjust
28 * your indexing code to match, and re-index.
30 // remove me when java 5 is no longer supported
31 // this is a workaround for a JDK bug that wrongly emits a warning.
32 @SuppressWarnings("dep-ann")
35 /** Match settings and bugs in Lucene's 2.0 release.
36 * @deprecated (3.1) Use latest
41 /** Match settings and bugs in Lucene's 2.1 release.
42 * @deprecated (3.1) Use latest
47 /** Match settings and bugs in Lucene's 2.2 release.
48 * @deprecated (3.1) Use latest
53 /** Match settings and bugs in Lucene's 2.3 release.
54 * @deprecated (3.1) Use latest
59 /** Match settings and bugs in Lucene's 2.4 release.
60 * @deprecated (3.1) Use latest
65 /** Match settings and bugs in Lucene's 2.9 release.
66 * @deprecated (3.1) Use latest
71 /** Match settings and bugs in Lucene's 3.0 release. */
74 /** Match settings and bugs in Lucene's 3.1 release. */
77 /** Match settings and bugs in Lucene's 3.2 release. */
80 /** Match settings and bugs in Lucene's 3.3 release. */
83 /** Match settings and bugs in Lucene's 3.4 release. */
87 * Match settings and bugs in Lucene's 3.5 release.
89 * Use this to get the latest & greatest settings, bug
90 * fixes, etc, for Lucene.
94 /* Add new constants for later versions **here** to respect order! */
97 * <p><b>WARNING</b>: if you use this setting, and then
98 * upgrade to a newer release of Lucene, sizable changes
99 * may happen. If backwards compatibility is important
100 * then you should instead explicitly specify an actual
103 * If you use this constant then you may need to
104 * <b>re-index all of your documents</b> when upgrading
105 * Lucene, as the way text is indexed may have changed.
106 * Additionally, you may need to <b>re-test your entire
107 * application</b> to ensure it behaves as expected, as
108 * some defaults may have changed and may break functionality
109 * in your application.
110 * @deprecated Use an actual version instead.
115 public boolean onOrAfter(Version other) {
116 return compareTo(other) >= 0;