initAttributes.put("solrIndexSchema", core.getSchema());
// Customize Carrot2's resource lookup to first look for resources
// using Solr's resource loader. If that fails, try loading from the classpath.
DefaultLexicalDataFactoryDescriptor.attributeBuilder(initAttributes)
.resourceLookup(new ResourceLookup(new IResourceLocator() {
public IResource[] getAll(final String resource) {
final SolrResourceLoader resourceLoader = core.getResourceLoader();
final String carrot2ResourcesDir = resourceLoader.getConfigDir()
+ initParams.get(CarrotParams.LEXICAL_RESOURCES_DIR, CARROT_RESOURCES_PREFIX);
try {