Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-2702

How to store indexes in mssql database

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.6
    • None
    • indexing
    • 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

      { 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            atul_tripathi Atul Tripathi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified