r110881 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110880‎ | r110881 | r110882 >
Date:22:06, 7 February 2012
Author:oren
Status:deferred
Tags:
Comment:
added unimplemented method required to conform to Lucene 2.9.4 API
and deprecated to old one
Modified paths:
  • /trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/WikiSearcher.java (modified) (history)

Diff [purge]

Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/search/WikiSearcher.java
@@ -13,6 +13,7 @@
1414 import org.apache.lucene.document.FieldSelector;
1515 import org.apache.lucene.index.CorruptIndexException;
1616 import org.apache.lucene.index.Term;
 17+import org.apache.lucene.search.Collector;
1718 import org.apache.lucene.search.Explanation;
1819 import org.apache.lucene.search.Filter;
1920 import org.apache.lucene.search.HitCollector;
@@ -28,20 +29,22 @@
2930 import org.wikimedia.lsearch.interoperability.RMIMessengerClient;
3031
3132 /**
32 - * A generalized index searcher, supports various index
33 - * architectures.
 33+ * A generalized index searcher, supports various index architectures.
3434 *
35 - * Depending on the structure of the index (single file,
36 - * mainsplit, split) makes either a local
37 - * <code>IndexSearcher</code>, or a <code>MultiSearcher</code>
 35+ * Depending on the structure of the index
 36+ * <li>single file</li>
 37+ * <li>mainsplit</li>
 38+ * <li>split</li>
 39+ * makes either a local <code>IndexSearcher</code>, or a <code>MultiSearcher</code>
3840 * with <code>SearchableMul</code> objects distributed via RMI.
3941 *
40 - * The local searchers are always preferred (groups are ignored
41 - * for local searchers to avoid ambiguity).
 42+ * The local searchers are always preferred.
 43+ *
 44+ * (groups are ignored for local searchers to avoid ambiguity).
4245 *
 46+ * Actual searchers are pulled from {@link SearcherCache}.
 47+ *
4348 *
44 - * The actual searchers are pulled from {@link SearcherCache}.
45 - *
4649 * @author rainman
4750 *
4851 */
@@ -171,7 +174,10 @@
172175 public Query rewrite(Query query) throws IOException {
173176 return searcher.rewrite(query);
174177 }
175 -
 178+
 179+ /**
 180+ * @deprecated
 181+ */
176182 @Override
177183 public void search(Weight weight, Filter filter, HitCollector results)
178184 throws IOException {
@@ -179,6 +185,13 @@
180186 }
181187
182188 @Override
 189+ public void search(Weight weight, Filter filter, Collector results)
 190+ throws IOException {
 191+ searcher.search(weight,filter,results);
 192+
 193+ }
 194+
 195+ @Override
183196 public TopDocs search(Weight weight, Filter filter, int n)
184197 throws IOException {
185198 return searcher.search(weight,filter,n);
@@ -209,14 +222,16 @@
210223 else
211224 return searcher.toString();
212225 }
213 -
 226+ @Override
214227 public Document[] docs(int[] i, FieldSelector sel) throws IOException {
215228 return searcher.docs(i,sel);
216229 }
217 -
 230+ @Override
218231 public Document doc(int i, FieldSelector sel) throws CorruptIndexException, IOException {
219232 return searcher.doc(i,sel);
220233 }
 234+
 235+
221236
222237
223238 }

Status & tagging log