You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2015/02/01 10:50:25 UTC
svn commit: r1656276 - in /lucene/dev/branches/lucene_solr_4_10/lucene:
CHANGES.txt core/src/java/org/apache/lucene/index/IndexWriter.java
core/src/java/org/apache/lucene/index/TrackingIndexWriter.java
Author: mikemccand
Date: Sun Feb 1 09:50:25 2015
New Revision: 1656276
URL: http://svn.apache.org/r1656276
Log:
LUCENE-6212: deprecate per-doc analyzers
Modified:
lucene/dev/branches/lucene_solr_4_10/lucene/CHANGES.txt
lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/TrackingIndexWriter.java
Modified: lucene/dev/branches/lucene_solr_4_10/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/CHANGES.txt?rev=1656276&r1=1656275&r2=1656276&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/CHANGES.txt Sun Feb 1 09:50:25 2015
@@ -22,6 +22,13 @@ Bug fixes
sorted (set) doc values instance at the same time.
(Tom Shally, Robert Muir, Adrien Grand)
+API Changes
+
+* LUCENE-6212: Deprecate IndexWriter APIs that accept per-document Analyzer.
+ These methods were trappy as they made it easy to accidentally index
+ tokens that were not easily searchable and will be removed in 5.0.0.
+ (Mike McCandless)
+
======================= Lucene 4.10.3 ======================
Bug fixes
Modified: lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1656276&r1=1656275&r2=1656276&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java Sun Feb 1 09:50:25 2015
@@ -1241,7 +1241,10 @@ public class IndexWriter implements Clos
*
* @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
+ *
+ * @deprecated This will be removed in 5.0.0.
*/
+ @Deprecated
public void addDocument(Iterable<? extends IndexableField> doc, Analyzer analyzer) throws IOException {
updateDocument(null, doc, analyzer);
}
@@ -1297,7 +1300,10 @@ public class IndexWriter implements Clos
* @throws IOException if there is a low-level IO error
*
* @lucene.experimental
+ *
+ * @deprecated This will be removed in 5.0.0.
*/
+ @Deprecated
public void addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer analyzer) throws IOException {
updateDocuments(null, docs, analyzer);
}
@@ -1332,7 +1338,10 @@ public class IndexWriter implements Clos
* @throws IOException if there is a low-level IO error
*
* @lucene.experimental
+ *
+ * @deprecated This will be removed in 5.0.0.
*/
+ @Deprecated
public void updateDocuments(Term delTerm, Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer analyzer) throws IOException {
ensureOpen();
try {
@@ -1501,7 +1510,10 @@ public class IndexWriter implements Clos
* @param analyzer the analyzer to use when analyzing the document
* @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
+ *
+ * @deprecated This will be removed in 5.0.0.
*/
+ @Deprecated
public void updateDocument(Term term, Iterable<? extends IndexableField> doc, Analyzer analyzer)
throws IOException {
ensureOpen();
Modified: lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/TrackingIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/TrackingIndexWriter.java?rev=1656276&r1=1656275&r2=1656276&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/TrackingIndexWriter.java (original)
+++ lucene/dev/branches/lucene_solr_4_10/lucene/core/src/java/org/apache/lucene/index/TrackingIndexWriter.java Sun Feb 1 09:50:25 2015
@@ -50,7 +50,11 @@ public class TrackingIndexWriter {
/** Calls {@link
* IndexWriter#updateDocument(Term,Iterable,Analyzer)}
- * and returns the generation that reflects this change. */
+ * and returns the generation that reflects this change.
+ *
+ * @deprecated This will be removed in 5.0.0.
+ */
+ @Deprecated
public long updateDocument(Term t, Iterable<? extends IndexableField> d, Analyzer a) throws IOException {
writer.updateDocument(t, d, a);
// Return gen as of when indexing finished:
@@ -68,7 +72,11 @@ public class TrackingIndexWriter {
/** Calls {@link
* IndexWriter#updateDocuments(Term,Iterable,Analyzer)}
- * and returns the generation that reflects this change. */
+ * and returns the generation that reflects this change.
+ *
+ * @deprecated This will be removed in 5.0.0.
+ */
+ @Deprecated
public long updateDocuments(Term t, Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer a) throws IOException {
writer.updateDocuments(t, docs, a);
// Return gen as of when indexing finished:
@@ -126,7 +134,11 @@ public class TrackingIndexWriter {
/** Calls {@link
* IndexWriter#addDocument(Iterable,Analyzer)} and
- * returns the generation that reflects this change. */
+ * returns the generation that reflects this change.
+ *
+ * @deprecated This will be removed in 5.0.0.
+ */
+ @Deprecated
public long addDocument(Iterable<? extends IndexableField> d, Analyzer a) throws IOException {
writer.addDocument(d, a);
// Return gen as of when indexing finished:
@@ -135,7 +147,11 @@ public class TrackingIndexWriter {
/** Calls {@link
* IndexWriter#addDocuments(Iterable,Analyzer)} and
- * returns the generation that reflects this change. */
+ * returns the generation that reflects this change.
+ *
+ * @deprecated This will be removed in 5.0.0.
+ */
+ @Deprecated
public long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer a) throws IOException {
writer.addDocuments(docs, a);
// Return gen as of when indexing finished: