Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
1.6
-
None
-
None
-
JackRabbit 1.6.0
Lucene 2.4.1
JDK 6,
Apache Tomcat 6_0_20
MS SQL SERVER 2005
Description
I am creating the jackrabbit repository programmatically instead of using xml configuration. I am able to store my content (datasore) and versioning information in MS SQL SERVER database but indexes are still being stored in file system even though i pass FileSystemFactory (creates org.apache.jackrabbit.core.fs.db.MSSqlFileSystem instance) in SearchConfig.
Below is the code snippet:
// Method to get FileSystemFactory which creates instance of MSSqlFileSystem
FileSystemFactory getFileSystem() {
..........................
.........................
return new FileSystemFactory() {
public FileSystem getFileSystem() throws RepositoryException
}
// Method to get SearchConfig
SearchConfig getSearchConfig(FileSystemFactory fileSystemFactory )
{ String searchIndexClass = "org.apache.jackrabbit.core.query.lucene.SearchIndex"; Properties params = new Properties(); params.put("path", getIndexPath()); params.put("textFilterClasses", .....................); params.put("analyzer", ....................); params.put("queryClass", ...............); .................... ....................... return new SearchConfig(searchIndexClass , params, fileSystemFactory ); }void createRepository()
{ FileSystemFactory fileSystem = getFileSystem(); searchConfig = getSearchConfig(fileSystem); RepositoryConfig repositoryConfig = new RepositoryConfig(repoPath, securityConfig, fileSystem, workspaceDirectory, null, defaultWorkspace, maxIdleTime, wsElement, versioningConfig, searchConfig, null, dataStoreFactory, LockMechanismFactory, repositoryConfigurationParser); repositoryConfig.init(); JackrabbitRepository repository = RepositoryImpl.create(repositoryConfig); }Is this possible to store indexes in database using jackrabbit?
Thanks,
Atul Tripathi