Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-819

Create addon for integration with Solr search engine

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.1.0.M1
    • Component/s: None
    • Labels:
      None

      Description

      Create addon for integration with Solr search engine

        Activity

        Hide
        sschmidt Stefan Schmidt added a comment -

        Initial commit of this new addon (commit a77ac57db9274295dd305fd051e28c345afd0131) is completed.

        This ships with a complete backend integration for Apache Solr (Roo entities can be annotated with @RooSolrSearchable which creates an ITD to hook the entity lifecycle (persist, merge, remove) into Solr. Furthermore, several convenience methods are introduced which allow indexing and deleting of entities. Two search methods allow convenient searching of the Solr index.

        The following commands are provided:

        solr setup // install SolrJ driver dependency into the pom and register solr server in application context
        solr add // to mark an individual entity for solr indexing
        solr all // to mark all entities in the project for solr indexing

        The addon requires a running instance of the Apache Solr server:

        1. Download the server: http://www.apache.org/dyn/closer.cgi/lucene/solr/
        2. Unzip (untar) the download: tar xf apache-solr-1.4.0.tgz
        3. Change into the solr examples directory: cd apache-solr-1.4.0/examples
        4. Start the Solr server: java -jar start.jar
        (5. Verify Solr is running correctly: http://localhost:8983/solr/admin/)

        The URL of the solr server location can be changed in the project src/main/resources/META-INF/spring/solr.properties config file.

        To index existing DB entity tables each entity exposes a convenience method (example for Pet entity):

        Pet.indexPets(Pet.findAllPets());

        Front-end (controller and MVC/JSP views) are currently work-in-progress. However, the following Ajax Library offers a neat front-end for those who want to take this a step further: http://github.com/evolvingweb/ajax-solr It is planned to provide a out of the box integration with the Ajax-Solr front-end through this addon in the medium term. Contributions are always welcome!

        Show
        sschmidt Stefan Schmidt added a comment - Initial commit of this new addon (commit a77ac57db9274295dd305fd051e28c345afd0131) is completed. This ships with a complete backend integration for Apache Solr (Roo entities can be annotated with @RooSolrSearchable which creates an ITD to hook the entity lifecycle (persist, merge, remove) into Solr. Furthermore, several convenience methods are introduced which allow indexing and deleting of entities. Two search methods allow convenient searching of the Solr index. The following commands are provided: solr setup // install SolrJ driver dependency into the pom and register solr server in application context solr add // to mark an individual entity for solr indexing solr all // to mark all entities in the project for solr indexing The addon requires a running instance of the Apache Solr server: 1. Download the server: http://www.apache.org/dyn/closer.cgi/lucene/solr/ 2. Unzip (untar) the download: tar xf apache-solr-1.4.0.tgz 3. Change into the solr examples directory: cd apache-solr-1.4.0/examples 4. Start the Solr server: java -jar start.jar (5. Verify Solr is running correctly: http://localhost:8983/solr/admin/ ) The URL of the solr server location can be changed in the project src/main/resources/META-INF/spring/solr.properties config file. To index existing DB entity tables each entity exposes a convenience method (example for Pet entity): Pet.indexPets(Pet.findAllPets()); Front-end (controller and MVC/JSP views) are currently work-in-progress. However, the following Ajax Library offers a neat front-end for those who want to take this a step further: http://github.com/evolvingweb/ajax-solr It is planned to provide a out of the box integration with the Ajax-Solr front-end through this addon in the medium term. Contributions are always welcome!
        Hide
        eruiz Enrique Ruiz (DiSiD) added a comment -

        Hi Stefan,
        Will the new front-end be similar to current entity search forms?
        Using Solr, do you think the search forms could have improved features (mix entity fields, etc)?
        Thanks

        Show
        eruiz Enrique Ruiz (DiSiD) added a comment - Hi Stefan, Will the new front-end be similar to current entity search forms? Using Solr, do you think the search forms could have improved features (mix entity fields, etc)? Thanks

          People

          • Assignee:
            sschmidt Stefan Schmidt
            Reporter:
            sschmidt Stefan Schmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: