List of usage examples for org.apache.lucene.analysis.core StopFilterFactory StopFilterFactory
public StopFilterFactory(Map<String, String> args)
From source file:uk.gov.nationalarchives.discovery.taxonomy.common.config.LuceneIAViewConfiguration.java
License:Mozilla Public License
/** ************************* FilterFactories and Analyzers *//*from w ww . jav a2 s . c o m*/ public @Bean StopFilterFactory stopFilterFactory() { Map<String, String> stopFilterArgs = new HashMap<String, String>(); stopFilterArgs.put("words", "stopwords.txt"); stopFilterArgs.put("enablePositionIncrements", "true"); stopFilterArgs.put("luceneMatchVersion", version); StopFilterFactory stopFilterFactory = new StopFilterFactory(stopFilterArgs); try { ResourceLoader loader = new ClasspathResourceLoader(getClass()); stopFilterFactory.inform(loader); } catch (IOException e) { logger.error(".stopFilterFactory: an error occured while creating the Filter factory: {}", e.getMessage()); } return stopFilterFactory; }