mirror of https://github.com/apache/lucene.git
LUCENE-6774: Remove solr hack in MorfologikFilter
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1700837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5330bd6d2b
commit
387c7d2077
|
@ -100,6 +100,8 @@ Bug Fixes
|
||||||
* LUCENE-6748: UsageTrackingQueryCachingPolicy no longer caches trivial queries
|
* LUCENE-6748: UsageTrackingQueryCachingPolicy no longer caches trivial queries
|
||||||
like MatchAllDocsQuery. (Adrien Grand)
|
like MatchAllDocsQuery. (Adrien Grand)
|
||||||
|
|
||||||
|
* LUCENE-6774: Remove solr hack in MorfologikFilter. (Robert Muir)
|
||||||
|
|
||||||
Other
|
Other
|
||||||
|
|
||||||
* LUCENE-6174: Improve "ant eclipse" to select right JRE for building.
|
* LUCENE-6174: Improve "ant eclipse" to select right JRE for building.
|
||||||
|
|
|
@ -76,17 +76,8 @@ public class MorfologikFilter extends TokenFilter {
|
||||||
public MorfologikFilter(final TokenStream in, final String dict) {
|
public MorfologikFilter(final TokenStream in, final String dict) {
|
||||||
super(in);
|
super(in);
|
||||||
this.input = in;
|
this.input = in;
|
||||||
|
|
||||||
// SOLR-4007: temporarily substitute context class loader to allow finding dictionary resources.
|
|
||||||
Thread me = Thread.currentThread();
|
|
||||||
ClassLoader cl = me.getContextClassLoader();
|
|
||||||
try {
|
|
||||||
me.setContextClassLoader(morfologik.stemming.Dictionary.class.getClassLoader());
|
|
||||||
this.stemmer = new DictionaryLookup(morfologik.stemming.Dictionary.getForLanguage(dict));
|
this.stemmer = new DictionaryLookup(morfologik.stemming.Dictionary.getForLanguage(dict));
|
||||||
this.lemmaList = Collections.emptyList();
|
this.lemmaList = Collections.emptyList();
|
||||||
} finally {
|
|
||||||
me.setContextClassLoader(cl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -67,8 +67,6 @@ grant {
|
||||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.util";
|
permission java.lang.RuntimePermission "accessClassInPackage.sun.util";
|
||||||
// needed for test of IOUtils.spins (maybe it can be avoided)
|
// needed for test of IOUtils.spins (maybe it can be avoided)
|
||||||
permission java.lang.RuntimePermission "getFileStoreAttributes";
|
permission java.lang.RuntimePermission "getFileStoreAttributes";
|
||||||
// analyzers/morfologik: needed for a horrible context classloader hack for solr in morfologikfilter: nuke this
|
|
||||||
permission java.lang.RuntimePermission "setContextClassLoader";
|
|
||||||
// analyzers/uima: needed by UIMA message localization... (?)
|
// analyzers/uima: needed by UIMA message localization... (?)
|
||||||
permission java.lang.RuntimePermission "createSecurityManager";
|
permission java.lang.RuntimePermission "createSecurityManager";
|
||||||
permission java.lang.RuntimePermission "createClassLoader";
|
permission java.lang.RuntimePermission "createClassLoader";
|
||||||
|
|
Loading…
Reference in New Issue