DirectoryProviderFactory configuration problem

Description

Because IdHashShardingStrategy fails after 1.7m ID is reached I decided to use my own version of strategy. I set up property common.hibernate.search.blogentry.sharding_strategy = com. ... .IdShardingStrategy and didn't work for me. As I checked problem exist in DirectoryProviderFactory and the way how properties are created ( new Properties( defaultProperties ) ). This constructor and the way how default properties are stored in this Object this both together doesn't work well. Problem exist:

//define sharding strategy
IndexShardingStrategy shardingStrategy;
Properties shardingProperties = new Properties();
for (Map.Entry entry : indexProps[0].entrySet()) {
if ( ( (String) entry.getKey() ).startsWith( SHARDING_STRATEGY ) ) {
shardingProperties.put( entry.getKey(), entry.getValue() );
}
}
String shardingStrategyName = shardingProperties.getProperty( SHARDING_STRATEGY );
if ( shardingStrategyName == null) {
if ( indexProps.length == 1 ) {
shardingStrategy = new NotShardedStrategy();
}
else {
shardingStrategy = new IdHashShardingStrategy();
}
}
else {

in this loop "for (Map.Entry entry : indexProps[0].entrySet()) {" this set is just empty so custom properties for sharding have been ignored.

Workaround:

Instead using new Properties(defaultProps) I'm using method:

private static Properties createProperties(Properties indexSpecificDefaultProps) {
Properties properties = new Properties();
properties.putAll(indexSpecificDefaultProps);
return properties;
}

Activity

Show:

Sanne Grinovero October 10, 2008 at 12:24 PM

was solved already by

Rafal Glowacz September 10, 2008 at 9:40 AM

My current one is 3.0.0, so I'll check upgrade. Thx

Sanne Grinovero September 10, 2008 at 3:29 AM

Is this 3.0.1?
I think I solved this one too many months ago, could you please test a newer release?

Fixed

Details

Assignee

Reporter

Original estimate

Time tracking

No time logged8h remaining

Fix versions

Affects versions

Priority

Created July 28, 2008 at 8:47 AM
Updated December 10, 2008 at 3:18 PM
Resolved October 10, 2008 at 12:24 PM