} catch (ClassNotFoundException e) {
return indexingProperties;
}
try {
SearchMapping mapping = (SearchMapping) indexingProperties.get(Environment.MODEL_MAPPING);
if (mapping == null) {
mapping = new SearchMapping();
Properties amendedProperties = new Properties();
amendedProperties.putAll(indexingProperties);
amendedProperties.put(Environment.MODEL_MAPPING, mapping);
indexingProperties = amendedProperties;
}
Cache cache = cr.getComponent(Cache.class);
FieldBridge fb = (FieldBridge) fbClass.getConstructor(Cache.class).newInstance(cache);
mapping.entity(Util.loadClassStrict("org.infinispan.query.remote.indexing.ProtobufValueWrapper", cl))
.indexed().classBridgeInstance(fb).norms(Norms.NO).analyze(Analyze.YES).store(Store.YES);
} catch (Exception e) {
throw new CacheException("Failed to configure indexing for remote query", e);
}
return indexingProperties;