mirror of https://github.com/apache/lucene.git
LUCENE-7692: PatternReplaceCharFilterFactory should implement MultiTermAware.
This commit is contained in:
parent
7caaf6f32a
commit
f0e59ea849
|
@ -123,6 +123,9 @@ Bug Fixes
|
|||
* LUCENE-7679: MemoryIndex was ignoring omitNorms settings on passed-in
|
||||
IndexableFields. (Alan Woodward)
|
||||
|
||||
* LUCENE-7692: PatternReplaceCharFilterFactory now implements MultiTermAware.
|
||||
(Adrien Grand)
|
||||
|
||||
Improvements
|
||||
|
||||
* LUCENE-7055: Added Weight#scorerSupplier, which allows to estimate the cost
|
||||
|
|
|
@ -22,7 +22,9 @@ import java.util.Map;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.lucene.analysis.CharFilter;
|
||||
import org.apache.lucene.analysis.util.AbstractAnalysisFactory;
|
||||
import org.apache.lucene.analysis.util.CharFilterFactory;
|
||||
import org.apache.lucene.analysis.util.MultiTermAwareComponent;
|
||||
|
||||
/**
|
||||
* Factory for {@link PatternReplaceCharFilter}.
|
||||
|
@ -37,7 +39,7 @@ import org.apache.lucene.analysis.util.CharFilterFactory;
|
|||
*
|
||||
* @since Solr 3.1
|
||||
*/
|
||||
public class PatternReplaceCharFilterFactory extends CharFilterFactory {
|
||||
public class PatternReplaceCharFilterFactory extends CharFilterFactory implements MultiTermAwareComponent {
|
||||
private final Pattern pattern;
|
||||
private final String replacement;
|
||||
|
||||
|
@ -55,4 +57,9 @@ public class PatternReplaceCharFilterFactory extends CharFilterFactory {
|
|||
public CharFilter create(Reader input) {
|
||||
return new PatternReplaceCharFilter(pattern, replacement, input);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractAnalysisFactory getMultiTermComponent() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue