Moved HtmlStripCharFilterFactory to analyis.common package like the other factories.
This commit is contained in:
parent
0b776a1de0
commit
ff3b909a83
|
@ -67,7 +67,6 @@ import org.apache.lucene.analysis.standard.ClassicFilter;
|
|||
import org.apache.lucene.analysis.tr.ApostropheFilter;
|
||||
import org.apache.lucene.analysis.util.ElisionFilter;
|
||||
import org.elasticsearch.index.analysis.CharFilterFactory;
|
||||
import org.elasticsearch.index.analysis.HtmlStripCharFilterFactory;
|
||||
import org.elasticsearch.index.analysis.PreConfiguredCharFilter;
|
||||
import org.elasticsearch.index.analysis.PreConfiguredTokenFilter;
|
||||
import org.elasticsearch.index.analysis.PreConfiguredTokenizer;
|
||||
|
|
|
@ -17,12 +17,13 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.index.analysis;
|
||||
package org.elasticsearch.analysis.common;
|
||||
|
||||
import org.apache.lucene.analysis.charfilter.HTMLStripCharFilter;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.env.Environment;
|
||||
import org.elasticsearch.index.IndexSettings;
|
||||
import org.elasticsearch.index.analysis.AbstractCharFilterFactory;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.Set;
|
||||
|
@ -33,7 +34,7 @@ import static org.elasticsearch.common.util.set.Sets.newHashSet;
|
|||
public class HtmlStripCharFilterFactory extends AbstractCharFilterFactory {
|
||||
private final Set<String> escapedTags;
|
||||
|
||||
public HtmlStripCharFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
|
||||
HtmlStripCharFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
|
||||
super(indexSettings, name);
|
||||
String[] escapedTags = settings.getAsArray("escaped_tags");
|
||||
if (escapedTags.length > 0) {
|
||||
|
@ -43,10 +44,6 @@ public class HtmlStripCharFilterFactory extends AbstractCharFilterFactory {
|
|||
}
|
||||
}
|
||||
|
||||
public Set<String> escapedTags() {
|
||||
return escapedTags;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Reader create(Reader tokenStream) {
|
||||
return new HTMLStripCharFilter(tokenStream, escapedTags);
|
|
@ -37,7 +37,7 @@ public class MappingCharFilterFactory extends AbstractCharFilterFactory implemen
|
|||
|
||||
private final NormalizeCharMap normMap;
|
||||
|
||||
public MappingCharFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
|
||||
MappingCharFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {
|
||||
super(indexSettings, name);
|
||||
|
||||
List<String> rules = Analysis.getWordList(env, settings, "mappings");
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.apache.lucene.analysis.en.PorterStemFilterFactory;
|
|||
import org.apache.lucene.analysis.miscellaneous.LimitTokenCountFilterFactory;
|
||||
import org.apache.lucene.analysis.reverse.ReverseStringFilterFactory;
|
||||
import org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory;
|
||||
import org.elasticsearch.index.analysis.HtmlStripCharFilterFactory;
|
||||
import org.elasticsearch.index.analysis.SoraniNormalizationFilterFactory;
|
||||
import org.elasticsearch.index.analysis.SynonymTokenFilterFactory;
|
||||
import org.elasticsearch.indices.analysis.AnalysisFactoryTestCase;
|
||||
|
|
Loading…
Reference in New Issue