add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / src / java / org / apache / lucene / util / Version.java
1 package org.apache.lucene.util;
2
3 /**
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
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  */
19
20
21 /**
22  * Use by certain classes to match version compatibility
23  * across releases of Lucene.
24  * 
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.
29  */
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")
33 public enum Version {
34
35   /** Match settings and bugs in Lucene's 2.0 release. 
36    * @deprecated (3.1) Use latest 
37    */
38   @Deprecated
39   LUCENE_20,
40
41   /** Match settings and bugs in Lucene's 2.1 release. 
42    * @deprecated (3.1) Use latest 
43    */
44   @Deprecated
45   LUCENE_21,
46
47   /** Match settings and bugs in Lucene's 2.2 release. 
48    * @deprecated (3.1) Use latest 
49    */
50   @Deprecated
51   LUCENE_22,
52
53   /** Match settings and bugs in Lucene's 2.3 release. 
54    * @deprecated (3.1) Use latest 
55    */
56   @Deprecated
57   LUCENE_23,
58
59   /** Match settings and bugs in Lucene's 2.4 release. 
60    * @deprecated (3.1) Use latest 
61    */
62   @Deprecated
63   LUCENE_24,
64
65   /** Match settings and bugs in Lucene's 2.9 release. 
66    * @deprecated (3.1) Use latest 
67    */
68   @Deprecated
69   LUCENE_29,
70
71   /** Match settings and bugs in Lucene's 3.0 release. */
72   LUCENE_30,
73
74   /** Match settings and bugs in Lucene's 3.1 release. */
75   LUCENE_31,
76   
77   /** Match settings and bugs in Lucene's 3.2 release. */
78   LUCENE_32,
79   
80   /** Match settings and bugs in Lucene's 3.3 release. */
81   LUCENE_33,
82   
83   /**
84    * Match settings and bugs in Lucene's 3.4 release.
85    * <p>
86    * Use this to get the latest &amp; greatest settings, bug
87    * fixes, etc, for Lucene.
88    */
89   LUCENE_34,
90   
91   /* Add new constants for later versions **here** to respect order! */
92
93   /**
94    * <p><b>WARNING</b>: if you use this setting, and then
95    * upgrade to a newer release of Lucene, sizable changes
96    * may happen.  If backwards compatibility is important
97    * then you should instead explicitly specify an actual
98    * version.
99    * <p>
100    * If you use this constant then you  may need to 
101    * <b>re-index all of your documents</b> when upgrading
102    * Lucene, as the way text is indexed may have changed. 
103    * Additionally, you may need to <b>re-test your entire
104    * application</b> to ensure it behaves as expected, as 
105    * some defaults may have changed and may break functionality 
106    * in your application. 
107    * @deprecated Use an actual version instead. 
108    */
109   @Deprecated
110   LUCENE_CURRENT;
111
112   public boolean onOrAfter(Version other) {
113     return compareTo(other) >= 0;
114   }
115 }