[
https://issues.apache.org/jira/browse/JCR-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Klimetschek resolved JCR-2702.
----------------------------------------
Resolution: Invalid
Please ask questions on the users mailing list:
http://jackrabbit.apache.org/mailing-lists.html
> How to store indexes in mssql database
> --------------------------------------
>
> Key: JCR-2702
> URL: https://issues.apache.org/jira/browse/JCR-2702
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: indexing
> Affects Versions: 1.6.0
> Environment: JackRabbit 1.6.0
> Lucene 2.4.1
> JDK 6,
> Apache Tomcat 6_0_20
> MS SQL SERVER 2005
> Reporter: Atul Tripathi
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> 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 {
> Properties parameters = new Properties();
> parameters.put("url",getUrl());
> parameters.put("user", getUserName());
> parameters.put("password", getPassword());
> parameters.put("schema", mssql);
> parameters.put("driver", getDriver());
> parameters.put("schemaObjectPrefix", "JR_");
> String fileSystemClass = "org.apache.jackrabbit.core.fs.db.MSSqlFileSystem"
> BeanConfig config = new BeanConfig(fileSystemClass, parameters);
> FileSystem fileSystem = (FileSystem) config.newInstance();
> fileSystem.init();
> }
> }
> // 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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.