[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-238) DirectoryProviderFactory configuration problem
Rafal Glowacz (JIRA)
noreply at atlassian.com
Wed Sep 10 03:42:05 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31135#action_31135 ]
Rafal Glowacz commented on HSEARCH-238:
---------------------------------------
My current one is 3.0.0, so I'll check upgrade. Thx
> DirectoryProviderFactory configuration problem
> ----------------------------------------------
>
> Key: HSEARCH-238
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-238
> Project: Hibernate Search
> Issue Type: Bug
> Reporter: Rafal Glowacz
> Assignee: Sanne Grinovero
> Original Estimate: 1 day
> Remaining Estimate: 1 day
>
> 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;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list