Solr
  1. Solr
  2. SOLR-1957

Move VelocityResponseWriter from contrib/ to core

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: Response Writers
    • Labels:
      None

      Description

      The VelocityResponseWriter deserves to be a first-class citizen in Solr, and not tacked on. The benefit is that UI can be generated right from Solr cleanly and easily via simple templating. The longer term goal is to migrate from the Solr admin interface from inflexible built-in JSPs to a cleaner layout Velocity set of templates that can be overridden externally if desired (for styling, or adding in plugin UI).

      Another large benefit to having VrW in core is that plugins can then ship with Velocity templates in their own .jar files to provide their own bits of UI or templated response capabilities (text fragments or full HTML responses).

      The impact of this change is a slightly larger solr.war with the additional Velocity dependencies added-in.

      1. SOLR-1957.patch
        13 kB
        Erik Hatcher
      2. SOLR-1957_3x.patch
        34 kB
        Robert Muir
      3. debug.tiff
        314 kB
        Erik Hatcher

        Activity

        Erik Hatcher created issue -
        Hide
        Erik Hatcher added a comment -

        First pass at a patch file. Some svn mv commands are needed to. Will document the full patch steps soon.

        Show
        Erik Hatcher added a comment - First pass at a patch file. Some svn mv commands are needed to. Will document the full patch steps soon.
        Erik Hatcher made changes -
        Field Original Value New Value
        Attachment SOLR-1957.patch [ 12447347 ]
        Hide
        Erik Hatcher added a comment -

        updated patch excluding the files that get svn mv'd

        Show
        Erik Hatcher added a comment - updated patch excluding the files that get svn mv'd
        Erik Hatcher made changes -
        Attachment SOLR-1957.patch [ 12447353 ]
        Erik Hatcher made changes -
        Attachment SOLR-1957.patch [ 12447347 ]
        Hide
        Erik Hatcher added a comment - - edited

        These commands should be run, then the patch file attached applied:

        svn mv contrib/velocity/src/main/java/org/apache/solr/response/VelocityResponseWriter.java src/java/org/apache/solr/response/
        svn mv contrib/velocity/src/main/java/org/apache/solr/response/PageTool.java src/java/org/apache/solr/response/
        svn mv contrib/velocity/src/main/java/org/apache/solr/response/SolrParamResourceLoader.java src/java/org/apache/solr/response/
        svn mv contrib/velocity/src/main/java/org/apache/solr/response/SolrVelocityResourceLoader.java src/java/org/apache/solr/response/
        svn mv contrib/velocity/src/test/org/apache/solr/velocity src/test/org/apache/solr/
        svn mv contrib/velocity/src/main/solr/lib/commons-beanutils-1.7.0.jar lib/
        svn mv contrib/velocity/src/main/solr/lib/commons-collections-3.2.1.jar lib/
        svn mv contrib/velocity/src/main/solr/lib/commons-lang-2.4.jar lib/
        svn mv contrib/velocity/src/main/solr/lib/velocity-1.6.1.jar lib/
        svn mv contrib/velocity/src/main/solr/lib/velocity-tools-2.0-beta3.jar lib/
        mkdir src/test/test-files/solr/conf/velocity
        svn add src/test/test-files/solr/conf/velocity
        svn mv contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm src/test/test-files/solr/conf/velocity/
        

        If there is a better way to "patch" all this, let me know.

        Show
        Erik Hatcher added a comment - - edited These commands should be run, then the patch file attached applied: svn mv contrib/velocity/src/main/java/org/apache/solr/response/VelocityResponseWriter.java src/java/org/apache/solr/response/ svn mv contrib/velocity/src/main/java/org/apache/solr/response/PageTool.java src/java/org/apache/solr/response/ svn mv contrib/velocity/src/main/java/org/apache/solr/response/SolrParamResourceLoader.java src/java/org/apache/solr/response/ svn mv contrib/velocity/src/main/java/org/apache/solr/response/SolrVelocityResourceLoader.java src/java/org/apache/solr/response/ svn mv contrib/velocity/src/test/org/apache/solr/velocity src/test/org/apache/solr/ svn mv contrib/velocity/src/main/solr/lib/commons-beanutils-1.7.0.jar lib/ svn mv contrib/velocity/src/main/solr/lib/commons-collections-3.2.1.jar lib/ svn mv contrib/velocity/src/main/solr/lib/commons-lang-2.4.jar lib/ svn mv contrib/velocity/src/main/solr/lib/velocity-1.6.1.jar lib/ svn mv contrib/velocity/src/main/solr/lib/velocity-tools-2.0-beta3.jar lib/ mkdir src/test/test-files/solr/conf/velocity svn add src/test/test-files/solr/conf/velocity svn mv contrib/velocity/src/main/solr/conf/velocity/VM_global_library.vm src/test/test-files/solr/conf/velocity/ If there is a better way to "patch" all this, let me know.
        Hide
        Robert Muir added a comment -

        I ran the commands, applied the patch, and browsed with the example docs.

        worked well for me.

        Show
        Robert Muir added a comment - I ran the commands, applied the patch, and browsed with the example docs. worked well for me.
        Hide
        Erik Hatcher added a comment -

        screenshot of the debug mode, toggle-ability of explains

        Show
        Erik Hatcher added a comment - screenshot of the debug mode, toggle-ability of explains
        Erik Hatcher made changes -
        Attachment debug.tiff [ 12447391 ]
        Erik Hatcher committed 955796 (36 files)
        Reviews: none

        SOLR-1957: Move VelocityResponseWriter from contrib to core

        Lucene trunk
        Hide
        Erik Hatcher added a comment -

        committed and complete

        Show
        Erik Hatcher added a comment - committed and complete
        Erik Hatcher made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0 [ 12314992 ]
        Resolution Fixed [ 1 ]
        Hide
        Robert Muir added a comment -

        Reopening as one easy way to solve the problem in SOLR-2002 is to simply merge this to 3.x

        Show
        Robert Muir added a comment - Reopening as one easy way to solve the problem in SOLR-2002 is to simply merge this to 3.x
        Robert Muir made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Erik Hatcher [ ehatcher ] Robert Muir [ rcmuir ]
        Robert Muir made changes -
        Fix Version/s 3.1 [ 12314371 ]
        Hide
        Robert Muir added a comment -

        attached is a patch for 3x (though: i used --no-diff-deleted since it reflects moves, it wont really apply but easier for reviewing).

        I included all velocity-related changes, such as SOLR-1894 as well:
        revisions: 955796, 955797, 955809, 955825, 955905, 955974, 955996, 956097, 956125, 956173, 956316, 957634

        All tests pass, and i ran 'ant run-example' and the browse view worked.

        Show
        Robert Muir added a comment - attached is a patch for 3x (though: i used --no-diff-deleted since it reflects moves, it wont really apply but easier for reviewing). I included all velocity-related changes, such as SOLR-1894 as well: revisions: 955796, 955797, 955809, 955825, 955905, 955974, 955996, 956097, 956125, 956173, 956316, 957634 All tests pass, and i ran 'ant run-example' and the browse view worked.
        Robert Muir made changes -
        Attachment SOLR-1957_3x.patch [ 12449661 ]
        Hide
        Robert Muir added a comment -

        I'd like to move forward with this shortly, to keep on with the build/test improvements.

        if there is any problem at all, i'll happily revert it.

        Show
        Robert Muir added a comment - I'd like to move forward with this shortly, to keep on with the build/test improvements. if there is any problem at all, i'll happily revert it.
        rmuir committed 964820 (128 files)
        Reviews: none

        SOLR-1957, SOLR-1894: merge all velocity improvements to 3x

        Lucene branch_3x
        Hide
        Robert Muir added a comment -

        merged to 3x (revision: r964820)

        Show
        Robert Muir added a comment - merged to 3x (revision: r964820)
        Robert Muir made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1.0 release

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1.0 release
        Grant Ingersoll made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Robert Muir
            Reporter:
            Erik Hatcher
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development