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

Allow indexingConfiguration to be loaded from the classpath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.1, 2.0
    • 2.1
    • indexing
    • None

    Description

      The "indexingConfiguration" attribute in the SearchIndex configuration (http://wiki.apache.org/jackrabbit/IndexingConfiguration) actually requires an absolute filesystem path.

      It would be nice if SearchIndex would also accept a file available in the classpath... although you can use variables like ${wsp.home} or similar there are many scenarios where a classpath resource would help (for example when creating a new workspace the directory structure is automatically created by jackrabbit and doesn't need to be already available but the indexing configuration file does).

      I am attaching a simple patch to SearchIndex that tries to load the file from the classpath if it has not been found. Since priority is given to the old behavior (file before classpath) so it's fully backward compatible.

      Diff has been generated against trunk, it would be nice to have this patch also on the 2.0 branch.

      Attachments

        1. indexingConfiguration_classpath.diff
          3 kB
          Fabrizio Giustina

        Issue Links

          Activity

            People

              jukkaz Jukka Zitting
              fgiust Fabrizio Giustina
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: