[Hibernate-JIRA] Created: (HSEARCH-219) Manual indexing strategy not implemented
by Fol De Rol (JIRA)
Manual indexing strategy not implemented
----------------------------------------
Key: HSEARCH-219
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-219
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.0.1.GA
Reporter: Fol De Rol
Priority: Blocker
It looks impossible to implement fully manual strategy of indexing because of mandating event listeners to be registered.
See org.hibernate.search.util.ContextHelper.java:25:
//FIXME this sucks since we mandante the event listener use
This causes a side effect to my application that stores an indication that the certain object is indexed in a child collection. So, when I complete manual indexing of an object, I add an element to this collection (actually, the cluster node identifier). This causes the Hibernate Search event listener to be triggered because the dependent collection has been modified which in its turn adds one more indexing job. Finally, I get an endless recursion.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 6 months
[Hibernate-JIRA] Created: (HSEARCH-238) DirectoryProviderFactory configuration problem
by Rafal Glowacz (JIRA)
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
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 6 months
[Hibernate-JIRA] Created: (HSEARCH-239) Search default properties are ignored when at least one shard property exist
by Rafal Glowacz (JIRA)
Search default properties are ignored when at least one shard property exist
----------------------------------------------------------------------------
Key: HSEARCH-239
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-239
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.0.0.GA
Reporter: Rafal Glowacz
I'm trying to use shared strategy for search. So my basic setup was:
common.hibernate.search.default.indexBase = /lucene/index
common.hibernate.search.default.optimizer.operation_limit.max = 1000
common.hibernate.search.default.optimizer.transaction_limit.max = 1000
common.hibernate.search.default.directory_provider = org.hibernate.search.store.FSDirectoryProvider
common.hibernate.search.default.sharding_strategy = com.newbay.search.sharding.strategy.IdShardingStrategy
common.hibernate.search.blogentry.sharding_strategy.nbr_of_shards = 5
But this won't work for me because when sharding configuration properties exist then those default ones are completely ignored - I can't understand that. To change this I changed ".default." to ".blogentry." and then I found the bug that the number of properties decides how many shards I want for current index. (nbrOfShards = nbrOfShards >= indexSpecificDefaultProps.size() ?
nbrOfShards :
indexSpecificDefaultProps.size();)
So in this case I can't do anything. I'm looking for such config:
common.hibernate.search.default.indexBase = /lucene/index
common.hibernate.search.default.optimizer.operation_limit.max = 1000
common.hibernate.search.default.optimizer.transaction_limit.max = 1000
common.hibernate.search.default.directory_provider = org.hibernate.search.store.FSDirectoryProvider
common.hibernate.search.default.sharding_strategy = com.newbay.search.sharding.strategy.IdShardingStrategy
common.hibernate.search.website.sharding_strategy.nbr_of_shards = 2
common.hibernate.search.website.indexBase = /lucene/website
common.hibernate.search.blogentry.sharding_strategy.nbr_of_shards = 5
common.hibernate.search.blogentry.indexBase = /lucene/blogentry
But it doesn't work for now.
My solution for this is to build properties in order: default, indexProps, shardProps
//sharded
nbrOfShards = nbrOfShards >= indexSpecificDefaultProps.size() ?
nbrOfShards :
indexSpecificDefaultProps.size();
ensureListSize(indexSpecificProps, nbrOfShards);
for (int index = 0; index < nbrOfShards; index++) {
Properties properties = new Properties();
properties.putAll(defaultProperties);
properties.putAll(indexSpecificDefaultProps);
if (indexSpecificProps.get(index) != null) {
properties.putAll(indexSpecificProps.get(index));
}
indexSpecificProps.set(index, properties);
}
return indexSpecificProps.toArray(new Properties[indexSpecificProps.size()]);
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 6 months
[Hibernate-JIRA] Created: (HSEARCH-263) Wrong analyzers used in IndexWriter
by Sanne Grinovero (JIRA)
Wrong analyzers used in IndexWriter
-----------------------------------
Key: HSEARCH-263
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-263
Project: Hibernate Search
Issue Type: Bug
Components: analyzer
Affects Versions: 3.1.0.Beta1
Reporter: Sanne Grinovero
Priority: Critical
when an IndexWriter is first opened during a transaction commit it is assigned the analyzer connected to the first entity written,
if during the same transaction other entities are saved to the same index it will reuse the first one ( instead of the entity specified one).
I have a testcase showing the problem ready for commit but need your opinion about how to solve it.
I think the problem is that we register a ScopedAnalyzer for each DocumentBuilder, but there should be one per DirectoryProvider?
In this case we should check at startup that no entities sharing an index define conflicting Analyzer rules.
Another solution would be to let complete flexibility during analyzer definition, but reopen the IndexWriter when the entityType is different
from the last one indexed.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 6 months