[
https://issues.apache.org/jira/browse/LUCENE-5388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13866235#comment-13866235
]
Robert Muir commented on LUCENE-5388:
-------------------------------------
{noformat}
diff --git
a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java
b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java
index 6ac073a..534c166 100644
---
a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java
+++
b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/AbstractAnalysisFactory.java
@@ -75,7 +75,7 @@ public abstract class AbstractAnalysisFactory {
return originalArgs;
}
- /** this method can be called in the {@link
org.apache.lucene.analysis.util.TokenizerFactory#create(java.io.Reader)}
+ /** this method can be called in the {@link
org.apache.lucene.analysis.util.TokenizerFactory#create()}
* or {@link
org.apache.lucene.analysis.util.TokenFilterFactory#create(org.apache.lucene.analysis.TokenStream)}
methods,
* to inform user, that for this factory a {@link #luceneMatchVersion} is
required */
protected final void assureMatchVersion() {
diff --git a/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
b/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
index fb741a5..3d3e8e2 100644
--- a/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
+++ b/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
@@ -290,6 +290,7 @@ public class PreAnalyzedField extends FieldType {
@Override
public final void reset() throws IOException {
+ super.reset();
/* This is called after setReader, so here's how we can get the input we
care about ... */
this.input = super.input;
// NOTE: this acts like rewind if you call it again
{noformat}
> Eliminate construction over readers for Tokenizer
> -------------------------------------------------
>
> Key: LUCENE-5388
> URL: https://issues.apache.org/jira/browse/LUCENE-5388
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/other
> Reporter: Benson Margulies
>
> In the modern world, Tokenizers are intended to be reusable, with input
> supplied via #setReader. The constructors that take Reader are a vestige.
> Worse yet, they invite people to make mistakes in handling the reader that
> tangle them up with the state machine in Tokenizer. The sensible thing is to
> eliminate these ctors, and force setReader usage.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]