mirror of https://github.com/apache/lucene.git
SOLR-4253: Misleading resource loading warning from Carrot2 clustering component fixed
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1427755 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d03444f6e7
commit
ed09a998b6
|
@ -426,6 +426,10 @@ Bug Fixes
|
||||||
* SOLR-4251: Fix SynonymFilterFactory when an optional tokenizerFactory is supplied.
|
* SOLR-4251: Fix SynonymFilterFactory when an optional tokenizerFactory is supplied.
|
||||||
(Chris Bleakley via rmuir)
|
(Chris Bleakley via rmuir)
|
||||||
|
|
||||||
|
* SOLR-4253: Misleading resource loading warning from Carrot2 clustering
|
||||||
|
component fixed (Stanisław Osiński)
|
||||||
|
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -132,13 +132,10 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
|
||||||
try {
|
try {
|
||||||
resourceStream = resourceLoader.openResource(resourceName);
|
resourceStream = resourceLoader.openResource(resourceName);
|
||||||
asBytes = IOUtils.toByteArray(resourceStream);
|
asBytes = IOUtils.toByteArray(resourceStream);
|
||||||
} catch (RuntimeException e) {
|
} catch (IOException e) {
|
||||||
log.debug("Resource not found in Solr's config: " + resourceName
|
log.debug("Resource not found in Solr's config: " + resourceName
|
||||||
+ ". Using the default " + resource + " from Carrot JAR.");
|
+ ". Using the default " + resource + " from Carrot JAR.");
|
||||||
return new IResource[] {};
|
return new IResource[] {};
|
||||||
} catch (IOException e) {
|
|
||||||
log.warn("Could not read Solr resource " + resourceName);
|
|
||||||
return new IResource[] {};
|
|
||||||
} finally {
|
} finally {
|
||||||
if (resourceStream != null) Closeables.closeQuietly(resourceStream);
|
if (resourceStream != null) Closeables.closeQuietly(resourceStream);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue