Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/ArticleNamespaceScaling.java |
— | — | @@ -6,6 +6,10 @@ |
7 | 7 | import java.util.Map.Entry; |
8 | 8 | |
9 | 9 | public class ArticleNamespaceScaling implements Serializable { |
| 10 | + /** |
| 11 | + * |
| 12 | + */ |
| 13 | + private static final long serialVersionUID = 1784906723875795649L; |
10 | 14 | protected float[] nsBoost = null; |
11 | 15 | public static float talkPageScale = 0.25f; |
12 | 16 | |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/ArticleQueryWrap.java |
— | — | @@ -13,6 +13,10 @@ |
14 | 14 | * |
15 | 15 | */ |
16 | 16 | public class ArticleQueryWrap extends CustomBoostQuery { |
| 17 | + /** |
| 18 | + * |
| 19 | + */ |
| 20 | + private static final long serialVersionUID = -1647356840755233019L; |
17 | 21 | ArticleInfo article; |
18 | 22 | ArticleScaling scale; |
19 | 23 | AggregateInfo rank; |
— | — | @@ -70,6 +74,10 @@ |
71 | 75 | } |
72 | 76 | |
73 | 77 | protected class ArticleQueryWeight extends CustomWeight { |
| 78 | + /** |
| 79 | + * |
| 80 | + */ |
| 81 | + private static final long serialVersionUID = -6334167925459892278L; |
74 | 82 | public ArticleQueryWeight(Searcher searcher) throws IOException{ |
75 | 83 | super(searcher); |
76 | 84 | } |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/CustomBoostQuery.java |
— | — | @@ -51,7 +51,11 @@ |
52 | 52 | */ |
53 | 53 | public class CustomBoostQuery extends Query { |
54 | 54 | |
55 | | - private Query subQuery; |
| 55 | + /** |
| 56 | + * |
| 57 | + */ |
| 58 | + private static final long serialVersionUID = 1934182951954995292L; |
| 59 | +private Query subQuery; |
56 | 60 | private Query boostQuery; // optional, can be null |
57 | 61 | private boolean strict = false; // if true, boosting part of query does not take part in weights normalization. |
58 | 62 | |
— | — | @@ -176,7 +180,11 @@ |
177 | 181 | //=========================== W E I G H T ============================ |
178 | 182 | |
179 | 183 | protected class CustomWeight implements Weight { |
180 | | - Weight subQueryWeight; |
| 184 | + /** |
| 185 | + * |
| 186 | + */ |
| 187 | + private static final long serialVersionUID = -9003307546921937389L; |
| 188 | + Weight subQueryWeight; |
181 | 189 | Weight boostWeight; // optional |
182 | 190 | boolean qStrict; |
183 | 191 | Similarity similarity; |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/LogTransformScore.java |
— | — | @@ -8,6 +8,11 @@ |
9 | 9 | */ |
10 | 10 | public class LogTransformScore extends CustomBoostQuery { |
11 | 11 | |
| 12 | + /** |
| 13 | + * |
| 14 | + */ |
| 15 | + private static final long serialVersionUID = 1132683935546317625L; |
| 16 | + |
12 | 17 | public LogTransformScore(Query subQuery) { |
13 | 18 | super(subQuery); |
14 | 19 | } |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/RemoteSearchableMul.java |
— | — | @@ -12,7 +12,11 @@ |
13 | 13 | public class RemoteSearchableMul extends UnicastRemoteObject |
14 | 14 | implements SearchableMul { |
15 | 15 | |
16 | | - private Searchable local; |
| 16 | + /** |
| 17 | + * |
| 18 | + */ |
| 19 | + private static final long serialVersionUID = -1624996715150939881L; |
| 20 | + private Searchable local; |
17 | 21 | |
18 | 22 | /** Constructs and exports a remote searcher. */ |
19 | 23 | public RemoteSearchableMul(Searchable local) throws RemoteException { |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/ArticleScaling.java |
— | — | @@ -11,6 +11,11 @@ |
12 | 12 | */ |
13 | 13 | abstract public class ArticleScaling implements Serializable { |
14 | 14 | |
| 15 | + /** |
| 16 | + * |
| 17 | + */ |
| 18 | + private static final long serialVersionUID = 2170644350907751230L; |
| 19 | + |
15 | 20 | abstract public float score(float score, float diff); |
16 | 21 | public String explain(float score, float diff){ |
17 | 22 | return "score="+score+", diff="+diff; |
— | — | @@ -18,6 +23,10 @@ |
19 | 24 | |
20 | 25 | /** add to score ~ log(1/diff) between [0,max] */ |
21 | 26 | public static class Bonus extends ArticleScaling { |
| 27 | + /** |
| 28 | + * |
| 29 | + */ |
| 30 | + private static final long serialVersionUID = 1100709052264451254L; |
22 | 31 | float max; |
23 | 32 | public Bonus(float max){ |
24 | 33 | this.max = max; |
— | — | @@ -30,6 +39,10 @@ |
31 | 40 | |
32 | 41 | /** Scale score by ~ log(1/diff) between [min,max] */ |
33 | 42 | public static class Scaling extends ArticleScaling { |
| 43 | + /** |
| 44 | + * |
| 45 | + */ |
| 46 | + private static final long serialVersionUID = 5974506142878361951L; |
34 | 47 | float max, min; |
35 | 48 | public Scaling(float min, float max){ |
36 | 49 | this.max = max; |
— | — | @@ -43,6 +56,10 @@ |
44 | 57 | } |
45 | 58 | /** Scale score by ~ sqrt(1/diff) between [min,max] */ |
46 | 59 | public static class SqrtScale extends ArticleScaling { |
| 60 | + /** |
| 61 | + * |
| 62 | + */ |
| 63 | + private static final long serialVersionUID = 2046408434470271501L; |
47 | 64 | float max, min; |
48 | 65 | public SqrtScale(float min, float max){ |
49 | 66 | this.max = max; |
— | — | @@ -63,6 +80,10 @@ |
64 | 81 | |
65 | 82 | /** Return scores based on a step function of time */ |
66 | 83 | public static class StepScale extends ArticleScaling { |
| 84 | + /** |
| 85 | + * |
| 86 | + */ |
| 87 | + private static final long serialVersionUID = 1291538363159806255L; |
67 | 88 | float[] chunks = new float[5]; |
68 | 89 | public StepScale(float min, float max){ |
69 | 90 | float inc = (max-min)/chunks.length; |
— | — | @@ -94,6 +115,11 @@ |
95 | 116 | |
96 | 117 | /** No scaling */ |
97 | 118 | public static class None extends ArticleScaling { |
| 119 | + /** |
| 120 | + * |
| 121 | + */ |
| 122 | + private static final long serialVersionUID = -65887438293294573L; |
| 123 | + |
98 | 124 | @Override |
99 | 125 | public final float score(float score, float diff) { |
100 | 126 | return score; |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/ConstMinScore.java |
— | — | @@ -1,6 +1,10 @@ |
2 | 2 | package org.apache.lucene.search; |
3 | 3 | |
4 | 4 | public class ConstMinScore extends CustomBoostQuery { |
| 5 | + /** |
| 6 | + * |
| 7 | + */ |
| 8 | + private static final long serialVersionUID = -2209798601936292749L; |
5 | 9 | float minScore; |
6 | 10 | public ConstMinScore(Query subQuery, float minScore) { |
7 | 11 | super(subQuery); |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/RelevanceQuery.java |
— | — | @@ -20,6 +20,10 @@ |
21 | 21 | * |
22 | 22 | */ |
23 | 23 | public class RelevanceQuery extends Query { |
| 24 | + /** |
| 25 | + * |
| 26 | + */ |
| 27 | + private static final long serialVersionUID = -5784422445218817151L; |
24 | 28 | private Query main; |
25 | 29 | private ArrayList<Query> relevance = new ArrayList<Query>(); |
26 | 30 | private boolean strict = false; // if true, boosting part of query does not take part in weights normalization. |
— | — | @@ -118,6 +122,10 @@ |
119 | 123 | * |
120 | 124 | */ |
121 | 125 | protected class RelevanceWeight implements Weight { |
| 126 | + /** |
| 127 | + * |
| 128 | + */ |
| 129 | + private static final long serialVersionUID = 3207960159834833506L; |
122 | 130 | Weight mainWeight; |
123 | 131 | ArrayList<Weight> relevanceWeight = new ArrayList<Weight>(); |
124 | 132 | boolean qStrict; |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/PositionalOptions.java |
— | — | @@ -6,6 +6,10 @@ |
7 | 7 | import org.wikimedia.lsearch.search.AggregateInfoImpl.RankInfo; |
8 | 8 | |
9 | 9 | public class PositionalOptions implements Serializable { |
| 10 | + /** |
| 11 | + * |
| 12 | + */ |
| 13 | + private static final long serialVersionUID = 8133507278162258948L; |
10 | 14 | protected AggregateInfo aggregateMeta = null; |
11 | 15 | protected RankInfo rankMeta = null; |
12 | 16 | |
— | — | @@ -45,6 +49,11 @@ |
46 | 50 | |
47 | 51 | /** Options specific for phrases in contents */ |
48 | 52 | public static class Sloppy extends PositionalOptions { |
| 53 | + /** |
| 54 | + * |
| 55 | + */ |
| 56 | + private static final long serialVersionUID = -6778997372025237713L; |
| 57 | + |
49 | 58 | public Sloppy(){ |
50 | 59 | rankMeta = new RankInfo(); |
51 | 60 | useBeginBoost = true; |
— | — | @@ -65,6 +74,11 @@ |
66 | 75 | |
67 | 76 | /** Options for alttitle field */ |
68 | 77 | public static class Alttitle extends PositionalOptions { |
| 78 | + /** |
| 79 | + * |
| 80 | + */ |
| 81 | + private static final long serialVersionUID = -8151439171086838369L; |
| 82 | + |
69 | 83 | public Alttitle(){ |
70 | 84 | aggregateMeta = new AggregateInfoImpl(); |
71 | 85 | takeMaxScore = true; |
— | — | @@ -74,6 +88,11 @@ |
75 | 89 | } |
76 | 90 | /** Match only whole entries on an aggregate field */ |
77 | 91 | public static class AlttitleWhole extends PositionalOptions { |
| 92 | + /** |
| 93 | + * |
| 94 | + */ |
| 95 | + private static final long serialVersionUID = -44219584478834032L; |
| 96 | + |
78 | 97 | public AlttitleWhole(){ |
79 | 98 | aggregateMeta = new AggregateInfoImpl(); |
80 | 99 | takeMaxScore = true; |
— | — | @@ -85,6 +104,11 @@ |
86 | 105 | } |
87 | 106 | |
88 | 107 | public static class AlttitleWholeSloppy extends PositionalOptions { |
| 108 | + /** |
| 109 | + * |
| 110 | + */ |
| 111 | + private static final long serialVersionUID = -543978831961407868L; |
| 112 | + |
89 | 113 | public AlttitleWholeSloppy(){ |
90 | 114 | aggregateMeta = new AggregateInfoImpl(); |
91 | 115 | takeMaxScore = true; |
— | — | @@ -99,6 +123,11 @@ |
100 | 124 | |
101 | 125 | /** Options specific to related fields */ |
102 | 126 | public static class Related extends PositionalOptions { |
| 127 | + /** |
| 128 | + * |
| 129 | + */ |
| 130 | + private static final long serialVersionUID = -2602121388756335605L; |
| 131 | + |
103 | 132 | public Related(){ |
104 | 133 | aggregateMeta = new AggregateInfoImpl(); |
105 | 134 | takeMaxScore = true; |
— | — | @@ -107,6 +136,11 @@ |
108 | 137 | } |
109 | 138 | |
110 | 139 | public static class RelatedWhole extends PositionalOptions { |
| 140 | + /** |
| 141 | + * |
| 142 | + */ |
| 143 | + private static final long serialVersionUID = 6098185842620225695L; |
| 144 | + |
111 | 145 | public RelatedWhole(){ |
112 | 146 | aggregateMeta = new AggregateInfoImpl(); |
113 | 147 | takeMaxScore = true; |
— | — | @@ -117,6 +151,11 @@ |
118 | 152 | |
119 | 153 | /** Options for additional alttitle query */ |
120 | 154 | public static class AlttitleSloppy extends PositionalOptions { |
| 155 | + /** |
| 156 | + * |
| 157 | + */ |
| 158 | + private static final long serialVersionUID = -1855749973847919484L; |
| 159 | + |
121 | 160 | public AlttitleSloppy(){ |
122 | 161 | aggregateMeta = new AggregateInfoImpl(); |
123 | 162 | takeMaxScore = true; |
— | — | @@ -127,6 +166,11 @@ |
128 | 167 | |
129 | 168 | /** Options for additional alttitle query */ |
130 | 169 | public static class AlttitleExact extends PositionalOptions { |
| 170 | + /** |
| 171 | + * |
| 172 | + */ |
| 173 | + private static final long serialVersionUID = -1774598698488092771L; |
| 174 | + |
131 | 175 | public AlttitleExact(){ |
132 | 176 | aggregateMeta = new AggregateInfoImpl(); |
133 | 177 | takeMaxScore = true; |
— | — | @@ -136,6 +180,11 @@ |
137 | 181 | |
138 | 182 | /** alttitle query to match redirects */ |
139 | 183 | public static class RedirectMatch extends PositionalOptions { |
| 184 | + /** |
| 185 | + * |
| 186 | + */ |
| 187 | + private static final long serialVersionUID = 1371571685071626823L; |
| 188 | + |
140 | 189 | public RedirectMatch(){ |
141 | 190 | aggregateMeta = new AggregateInfoImpl(); |
142 | 191 | takeMaxScore = true; |
— | — | @@ -151,6 +200,11 @@ |
152 | 201 | |
153 | 202 | /** alttitle query to match complete titles */ |
154 | 203 | public static class RedirectComplete extends PositionalOptions { |
| 204 | + /** |
| 205 | + * |
| 206 | + */ |
| 207 | + private static final long serialVersionUID = -8968024335275647874L; |
| 208 | + |
155 | 209 | public RedirectComplete(){ |
156 | 210 | aggregateMeta = new AggregateInfoImpl(); |
157 | 211 | takeMaxScore = true; |
— | — | @@ -163,6 +217,11 @@ |
164 | 218 | |
165 | 219 | /** Options for sections field */ |
166 | 220 | public static class Sections extends PositionalOptions { |
| 221 | + /** |
| 222 | + * |
| 223 | + */ |
| 224 | + private static final long serialVersionUID = -8692410614019818270L; |
| 225 | + |
167 | 226 | public Sections(){ |
168 | 227 | aggregateMeta = new AggregateInfoImpl(); |
169 | 228 | takeMaxScore = true; |
— | — | @@ -172,6 +231,11 @@ |
173 | 232 | |
174 | 233 | /** Options for sections field */ |
175 | 234 | public static class SectionsWhole extends PositionalOptions { |
| 235 | + /** |
| 236 | + * |
| 237 | + */ |
| 238 | + private static final long serialVersionUID = 1350993858005999931L; |
| 239 | + |
176 | 240 | public SectionsWhole(){ |
177 | 241 | aggregateMeta = new AggregateInfoImpl(); |
178 | 242 | takeMaxScore = true; |
— | — | @@ -181,6 +245,11 @@ |
182 | 246 | } |
183 | 247 | /** Fallback to phasequery-type behaviour, no positional info */ |
184 | 248 | public static class PhraseQueryFallback extends PositionalOptions { |
| 249 | + /** |
| 250 | + * |
| 251 | + */ |
| 252 | + private static final long serialVersionUID = 6589847326296430092L; |
| 253 | + |
185 | 254 | public PhraseQueryFallback(){ |
186 | 255 | phraseQueryFallback = true; |
187 | 256 | } |
— | — | @@ -188,6 +257,11 @@ |
189 | 258 | |
190 | 259 | /** Near match phrases, when more than 50% of nonstopwords are matched */ |
191 | 260 | public static class AlttitleNearMatch extends PositionalOptions { |
| 261 | + /** |
| 262 | + * |
| 263 | + */ |
| 264 | + private static final long serialVersionUID = 4735381044510834341L; |
| 265 | + |
192 | 266 | public AlttitleNearMatch(){ |
193 | 267 | aggregateMeta = new AggregateInfoImpl(); |
194 | 268 | takeMaxScore = true; |
— | — | @@ -195,9 +269,19 @@ |
196 | 270 | } |
197 | 271 | |
198 | 272 | public abstract static class NamespaceBoost implements Serializable { |
| 273 | + /** |
| 274 | + * |
| 275 | + */ |
| 276 | + private static final long serialVersionUID = 1355534237962528582L; |
| 277 | + |
199 | 278 | public abstract float getBoost(int namespace); |
200 | 279 | |
201 | 280 | public static class DefaultBoost extends NamespaceBoost { |
| 281 | + /** |
| 282 | + * |
| 283 | + */ |
| 284 | + private static final long serialVersionUID = -3306348859577417462L; |
| 285 | + |
202 | 286 | public float getBoost(int namespace){ |
203 | 287 | if(namespace % 2 == 1) // talk pages |
204 | 288 | return 0.75f; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/SuggestResult.java |
— | — | @@ -7,6 +7,10 @@ |
8 | 8 | import org.wikimedia.lsearch.ranks.StringList; |
9 | 9 | |
10 | 10 | public class SuggestResult implements Serializable { |
| 11 | + /** |
| 12 | + * |
| 13 | + */ |
| 14 | + private static final long serialVersionUID = -467799933506179851L; |
11 | 15 | String word; |
12 | 16 | String decomposed; |
13 | 17 | int frequency=0; |
— | — | @@ -21,6 +25,10 @@ |
22 | 26 | HashSet<String> context = null; |
23 | 27 | |
24 | 28 | public static class SimilarResult extends SuggestResult { |
| 29 | + /** |
| 30 | + * |
| 31 | + */ |
| 32 | + private static final long serialVersionUID = -4990218719182038217L; |
25 | 33 | String key; |
26 | 34 | String redirectTo; |
27 | 35 | public SimilarResult(String word, int frequency, int dist, String key, String redirectTo) { |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/SuggestQuery.java |
— | — | @@ -5,6 +5,10 @@ |
6 | 6 | |
7 | 7 | /** Result of suggestion for a query */ |
8 | 8 | public class SuggestQuery implements Serializable { |
| 9 | + /** |
| 10 | + * |
| 11 | + */ |
| 12 | + private static final long serialVersionUID = -2382192421633557329L; |
9 | 13 | protected String searchterm; |
10 | 14 | protected ArrayList<Integer> ranges; |
11 | 15 | protected ArrayList<String> similarTitles; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/beans/Redirect.java |
— | — | @@ -3,6 +3,10 @@ |
4 | 4 | import java.io.Serializable; |
5 | 5 | |
6 | 6 | public class Redirect implements Serializable { |
| 7 | + /** |
| 8 | + * |
| 9 | + */ |
| 10 | + private static final long serialVersionUID = -3255489631746429906L; |
7 | 11 | int namespace; |
8 | 12 | String title; |
9 | 13 | int references; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/beans/Title.java |
— | — | @@ -5,8 +5,13 @@ |
6 | 6 | |
7 | 7 | /** Wiki article title */ |
8 | 8 | public class Title implements java.io.Serializable { |
9 | | - public int namespace; |
| 9 | + /** |
| 10 | + * |
| 11 | + */ |
| 12 | + private static final long serialVersionUID = 2897016046547702537L; |
10 | 13 | |
| 14 | + public int namespace; |
| 15 | + |
11 | 16 | public String title; |
12 | 17 | |
13 | 18 | public Title() { |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/beans/Article.java |
— | — | @@ -39,6 +39,10 @@ |
40 | 40 | * |
41 | 41 | */ |
42 | 42 | public class Article implements Serializable { |
| 43 | + /** |
| 44 | + * |
| 45 | + */ |
| 46 | + private static final long serialVersionUID = -6129349087807339628L; |
43 | 47 | private String namespace, title, contents; |
44 | 48 | private long pageId; |
45 | 49 | private int references; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/beans/SearchResults.java |
— | — | @@ -15,6 +15,10 @@ |
16 | 16 | * |
17 | 17 | */ |
18 | 18 | public class SearchResults implements Serializable { |
| 19 | + /** |
| 20 | + * |
| 21 | + */ |
| 22 | + private static final long serialVersionUID = 5909734328451839045L; |
19 | 23 | /** false if there is some sort of query-related error */ |
20 | 24 | protected boolean success; |
21 | 25 | protected int numHits; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/beans/ReportId.java |
— | — | @@ -13,6 +13,10 @@ |
14 | 14 | * |
15 | 15 | */ |
16 | 16 | public class ReportId implements Serializable { |
| 17 | + /** |
| 18 | + * |
| 19 | + */ |
| 20 | + private static final long serialVersionUID = -7461961497310594804L; |
17 | 21 | public long pageId; |
18 | 22 | public long timestamp; |
19 | 23 | /** string repesentation of index id */ |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/beans/ResultSet.java |
— | — | @@ -9,6 +9,10 @@ |
10 | 10 | |
11 | 11 | /** A single search result */ |
12 | 12 | public class ResultSet implements Serializable { |
| 13 | + /** |
| 14 | + * |
| 15 | + */ |
| 16 | + private static final long serialVersionUID = -3980290339174421410L; |
13 | 17 | public double score; |
14 | 18 | public String namespace; |
15 | 19 | public String title; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/beans/IndexReportCard.java |
— | — | @@ -10,6 +10,10 @@ |
11 | 11 | * |
12 | 12 | */ |
13 | 13 | public class IndexReportCard implements Serializable { |
| 14 | + /** |
| 15 | + * |
| 16 | + */ |
| 17 | + private static final long serialVersionUID = 3088690949562091144L; |
14 | 18 | protected boolean succDelete; |
15 | 19 | protected boolean succAdd; |
16 | 20 | protected ReportId id; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/MatchAllTitlesQuery.java |
— | — | @@ -36,6 +36,10 @@ |
37 | 37 | * @author John Wang |
38 | 38 | */ |
39 | 39 | public class MatchAllTitlesQuery extends Query { |
| 40 | + /** |
| 41 | + * |
| 42 | + */ |
| 43 | + private static final long serialVersionUID = -1601667485818315572L; |
40 | 44 | protected String titleField; |
41 | 45 | |
42 | 46 | public MatchAllTitlesQuery(String titleField) { |
— | — | @@ -91,6 +95,10 @@ |
92 | 96 | } |
93 | 97 | |
94 | 98 | private class MatchAllDocsWeight implements Weight { |
| 99 | + /** |
| 100 | + * |
| 101 | + */ |
| 102 | + private static final long serialVersionUID = 3242930691905297732L; |
95 | 103 | private Similarity similarity; |
96 | 104 | private float queryWeight; |
97 | 105 | private float queryNorm; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/PrefixFilter.java |
— | — | @@ -11,6 +11,10 @@ |
12 | 12 | import org.apache.lucene.search.Filter; |
13 | 13 | |
14 | 14 | public class PrefixFilter extends Filter { |
| 15 | + /** |
| 16 | + * |
| 17 | + */ |
| 18 | + private static final long serialVersionUID = 8990422701366201752L; |
15 | 19 | String[] prefixes; |
16 | 20 | |
17 | 21 | public PrefixFilter(String[] prefixes){ |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/ArticleInfoImpl.java |
— | — | @@ -8,6 +8,10 @@ |
9 | 9 | import org.wikimedia.lsearch.search.ArticleMeta.ArticleMetaSource; |
10 | 10 | |
11 | 11 | public class ArticleInfoImpl implements ArticleInfo, Serializable { |
| 12 | + /** |
| 13 | + * |
| 14 | + */ |
| 15 | + private static final long serialVersionUID = -6644676683172345759L; |
12 | 16 | protected transient ArticleMetaSource src = null; |
13 | 17 | |
14 | 18 | |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/AggregateInfoImpl.java |
— | — | @@ -19,6 +19,10 @@ |
20 | 20 | * |
21 | 21 | */ |
22 | 22 | public class AggregateInfoImpl implements AggregateInfo, Serializable { |
| 23 | + /** |
| 24 | + * |
| 25 | + */ |
| 26 | + private static final long serialVersionUID = -4735219536132923087L; |
23 | 27 | private static final Logger log = Logger.getLogger(AggregateInfoImpl.class); |
24 | 28 | protected transient AggregateMetaFieldSource src = null; |
25 | 29 | protected boolean hasRankingData = false; |
— | — | @@ -98,6 +102,11 @@ |
99 | 103 | |
100 | 104 | /** Provides ranking information */ |
101 | 105 | public static class RankInfo extends AggregateInfoImpl { |
| 106 | + /** |
| 107 | + * |
| 108 | + */ |
| 109 | + private static final long serialVersionUID = 390927371201941688L; |
| 110 | + |
102 | 111 | @Override |
103 | 112 | public void init(IndexReader reader, String field) throws IOException { |
104 | 113 | super.init(reader, "alttitle"); |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/NamespaceCompositeFilter.java |
— | — | @@ -15,6 +15,10 @@ |
16 | 16 | * |
17 | 17 | */ |
18 | 18 | public class NamespaceCompositeFilter extends Filter { |
| 19 | + /** |
| 20 | + * |
| 21 | + */ |
| 22 | + private static final long serialVersionUID = -745670120398519465L; |
19 | 23 | protected ArrayList<Filter> filters; |
20 | 24 | protected ArrayList<Filter> redirects; |
21 | 25 | |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/SuffixNamespaceFilter.java |
— | — | @@ -8,6 +8,10 @@ |
9 | 9 | import org.wikimedia.lsearch.config.IndexId; |
10 | 10 | |
11 | 11 | public class SuffixNamespaceFilter extends Filter { |
| 12 | + /** |
| 13 | + * |
| 14 | + */ |
| 15 | + private static final long serialVersionUID = -5307576223153302254L; |
12 | 16 | protected SuffixFilter suffix; |
13 | 17 | protected NamespaceFilter ns; |
14 | 18 | protected String dbrole; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/NamespaceFilter.java |
— | — | @@ -33,6 +33,10 @@ |
34 | 34 | /** A bean-like class that contains information about what namespaces |
35 | 35 | * to filter */ |
36 | 36 | public class NamespaceFilter implements Serializable { |
| 37 | + /** |
| 38 | + * |
| 39 | + */ |
| 40 | + private static final long serialVersionUID = -2952008708874152903L; |
37 | 41 | private BitSet included; |
38 | 42 | |
39 | 43 | protected void init(){ |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/HighlightPack.java |
— | — | @@ -13,6 +13,10 @@ |
14 | 14 | * |
15 | 15 | */ |
16 | 16 | public class HighlightPack implements Serializable { |
| 17 | + /** |
| 18 | + * |
| 19 | + */ |
| 20 | + private static final long serialVersionUID = 609396972424664393L; |
17 | 21 | public Term[] terms; |
18 | 22 | public int[] dfs; |
19 | 23 | public int maxDoc; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/SuffixFilter.java |
— | — | @@ -3,6 +3,10 @@ |
4 | 4 | import java.io.Serializable; |
5 | 5 | |
6 | 6 | public class SuffixFilter implements Serializable { |
| 7 | + /** |
| 8 | + * |
| 9 | + */ |
| 10 | + private static final long serialVersionUID = -5870248339797151268L; |
7 | 11 | protected String excludeSuffix; |
8 | 12 | |
9 | 13 | public SuffixFilter(String excludeSuffix) { |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/SuffixFilterWrapper.java |
— | — | @@ -12,6 +12,10 @@ |
13 | 13 | * |
14 | 14 | */ |
15 | 15 | public class SuffixFilterWrapper extends Filter { |
| 16 | + /** |
| 17 | + * |
| 18 | + */ |
| 19 | + private static final long serialVersionUID = 3142341770292623568L; |
16 | 20 | protected SuffixFilter filter; |
17 | 21 | |
18 | 22 | public SuffixFilterWrapper(SuffixFilter filter){ |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/CachedFilter.java |
— | — | @@ -15,6 +15,10 @@ |
16 | 16 | * |
17 | 17 | */ |
18 | 18 | public class CachedFilter extends Filter { |
| 19 | + /** |
| 20 | + * |
| 21 | + */ |
| 22 | + private static final long serialVersionUID = 6539066674645937801L; |
19 | 23 | protected Filter filter; |
20 | 24 | protected transient WeakHashMap<Directory,BitSet> cache = new WeakHashMap<Directory,BitSet>(); |
21 | 25 | |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/NamespaceCache.java |
— | — | @@ -35,6 +35,11 @@ |
36 | 36 | |
37 | 37 | public static class AllFilter extends Filter { |
38 | 38 | |
| 39 | + /** |
| 40 | + * |
| 41 | + */ |
| 42 | + private static final long serialVersionUID = 1054909244285213926L; |
| 43 | + |
39 | 44 | @Override |
40 | 45 | public BitSet bits(IndexReader reader) throws IOException { |
41 | 46 | BitSet bits = new BitSet(reader.maxDoc()); |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/SearcherCache.java |
— | — | @@ -156,6 +156,10 @@ |
157 | 157 | } |
158 | 158 | |
159 | 159 | public static class SearcherPoolStatus implements Serializable { |
| 160 | + /** |
| 161 | + * |
| 162 | + */ |
| 163 | + private static final long serialVersionUID = 292789721313775724L; |
160 | 164 | boolean ok = false; |
161 | 165 | int poolSize = 0; |
162 | 166 | |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/SuffixNamespaceWrapper.java |
— | — | @@ -7,6 +7,10 @@ |
8 | 8 | import org.apache.lucene.search.Filter; |
9 | 9 | |
10 | 10 | public class SuffixNamespaceWrapper extends Filter { |
| 11 | + /** |
| 12 | + * |
| 13 | + */ |
| 14 | + private static final long serialVersionUID = -424940152787744368L; |
11 | 15 | SuffixNamespaceFilter filter = null; |
12 | 16 | |
13 | 17 | public SuffixNamespaceWrapper(SuffixNamespaceFilter filter) { |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/FilterWrapper.java |
— | — | @@ -16,6 +16,10 @@ |
17 | 17 | * |
18 | 18 | */ |
19 | 19 | public class FilterWrapper extends Filter { |
| 20 | + /** |
| 21 | + * |
| 22 | + */ |
| 23 | + private static final long serialVersionUID = -3471396522832993612L; |
20 | 24 | protected NamespaceFilter nsFilter; |
21 | 25 | /** custom filters AND-ed with nsFilter */ |
22 | 26 | protected ArrayList<Filter> filters = new ArrayList<Filter>(); |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/RankValue.java |
— | — | @@ -14,6 +14,10 @@ |
15 | 15 | * |
16 | 16 | */ |
17 | 17 | public class RankValue implements ScoreValue, Serializable { |
| 18 | + /** |
| 19 | + * |
| 20 | + */ |
| 21 | + private static final long serialVersionUID = 9177306416695849726L; |
18 | 22 | protected transient RankFieldSource src; |
19 | 23 | protected float coefficient; |
20 | 24 | |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/SuffixFilterCache.java |
— | — | @@ -16,6 +16,10 @@ |
17 | 17 | |
18 | 18 | /** class to create the bitset that is to be cached */ |
19 | 19 | protected static class SuffixFilterBuilder extends Filter { |
| 20 | + /** |
| 21 | + * |
| 22 | + */ |
| 23 | + private static final long serialVersionUID = -1255620294875782513L; |
20 | 24 | SuffixFilter filter; |
21 | 25 | |
22 | 26 | public SuffixFilterBuilder(SuffixFilter filter) { |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/highlight/Snippet.java |
— | — | @@ -10,7 +10,16 @@ |
11 | 11 | * |
12 | 12 | */ |
13 | 13 | public class Snippet implements Serializable { |
| 14 | + /** |
| 15 | + * |
| 16 | + */ |
| 17 | + private static final long serialVersionUID = 3541172706793191310L; |
| 18 | + |
14 | 19 | public static class Range implements Serializable { |
| 20 | + /** |
| 21 | + * |
| 22 | + */ |
| 23 | + private static final long serialVersionUID = -1747783281795706440L; |
15 | 24 | public int start; |
16 | 25 | public int end; |
17 | 26 | |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/highlight/HighlightResult.java |
— | — | @@ -10,6 +10,10 @@ |
11 | 11 | * |
12 | 12 | */ |
13 | 13 | public class HighlightResult implements Serializable { |
| 14 | + /** |
| 15 | + * |
| 16 | + */ |
| 17 | + private static final long serialVersionUID = -1883566809164096486L; |
14 | 18 | protected Snippet title = null; |
15 | 19 | protected Snippet redirect = null; |
16 | 20 | protected Snippet section = null; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/highlight/Highlight.java |
— | — | @@ -60,6 +60,10 @@ |
61 | 61 | |
62 | 62 | /** Results from higlighting multiple articles */ |
63 | 63 | public static class ResultSet implements Serializable { |
| 64 | + /** |
| 65 | + * |
| 66 | + */ |
| 67 | + private static final long serialVersionUID = 3890215904401087086L; |
64 | 68 | public HashMap<String,HighlightResult> highlighted; |
65 | 69 | /** phrases matched in document, word1_word2 (i.e. separated by underscore) */ |
66 | 70 | public HashSet<String> phrases; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/index/IndexUpdateRecord.java |
— | — | @@ -21,6 +21,10 @@ |
22 | 22 | * |
23 | 23 | */ |
24 | 24 | public class IndexUpdateRecord implements Serializable { |
| 25 | + /** |
| 26 | + * |
| 27 | + */ |
| 28 | + private static final long serialVersionUID = 6558036612988171250L; |
25 | 29 | protected Article article; |
26 | 30 | public enum Action { ADD, UPDATE, DELETE }; |
27 | 31 | protected Action action; |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/index/WikiSimilarity.java |
— | — | @@ -12,6 +12,10 @@ |
13 | 13 | * |
14 | 14 | */ |
15 | 15 | public class WikiSimilarity extends DefaultSimilarity { |
| 16 | + /** |
| 17 | + * |
| 18 | + */ |
| 19 | + private static final long serialVersionUID = 2976567527058649924L; |
16 | 20 | static Logger log = Logger.getLogger(WikiSimilarity.class); |
17 | 21 | /** |
18 | 22 | * For content: |