Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.8
    • Component/s: clients - java
    • Labels:
      None

      Description

      SolrJ provides a SolrServer implementation backed by commons-httpclient which introduces many dependency jars (commons-codec, commons-io and commons-logging). Apart from that SolrJ also uses StAX API for XML parsing which introduces dependencies like stax-api, stax and stax-utils.

      This enhancement will add a SolrServer implementation backed by java.net.HttpUrlConnection and will use BinaryResponseParser as the default response parser. Using this basic implementation out of the box would require no dependencies on either commons-httpclient or StAX. The only dependency would be on solr-commons making this a very lightweight and distribution friendly Java client for Solr.

      1. SOLR-599.patch
        11 kB
        Ryan McKinley
      2. SOLR-599-fix-for-SolrJ-on-GAE.patch
        9 kB
        Kayode Odeyemi
      3. SOLR-599.patch
        7 kB
        Noble Paul

        Activity

        Hide
        Steve Rowe added a comment -

        Bulk move 4.4 issues to 4.5 and 5.0

        Show
        Steve Rowe added a comment - Bulk move 4.4 issues to 4.5 and 5.0
        Hide
        Robert Muir added a comment -

        moving all 4.0 issues not touched in a month to 4.1

        Show
        Robert Muir added a comment - moving all 4.0 issues not touched in a month to 4.1
        Hide
        Robert Muir added a comment -

        rmuir20120906-bulk-40-change

        Show
        Robert Muir added a comment - rmuir20120906-bulk-40-change
        Hide
        Hoss Man added a comment -

        bulk fixing the version info for 4.0-ALPHA and 4.0 all affected issues have "hoss20120711-bulk-40-change" in comment

        Show
        Hoss Man added a comment - bulk fixing the version info for 4.0-ALPHA and 4.0 all affected issues have "hoss20120711-bulk-40-change" in comment
        Hide
        Ryan McKinley added a comment -

        Here is an updated patch. It fixes:

        • license header
        • spacing
        • adds a test

        BUT the test fails with:

        1893 T23 C0 UPDATE [] webapp=/solr path=/update params={<delete><query>*:*</query></delete>=&wt=xml&version=2.2} {} 0 0
        1893 T23 C0 oasc.SolrException.log SEVERE org.apache.solr.common.SolrException: missing content stream
        		at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
        		at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
        		at org.apache.solr.core.SolrCore.execute(SolrCore.java:1540)
        

        Anyone want to take a look?

        Show
        Ryan McKinley added a comment - Here is an updated patch. It fixes: license header spacing adds a test BUT the test fails with: 1893 T23 C0 UPDATE [] webapp=/solr path=/update params={<delete><query>*:*</query></delete>=&wt=xml&version=2.2} {} 0 0 1893 T23 C0 oasc.SolrException.log SEVERE org.apache.solr.common.SolrException: missing content stream at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1540) Anyone want to take a look?
        Hide
        Kayode Odeyemi added a comment -

        An initial spec on this will help us understand how to repackage SolrJ. We can leave room for more opinions on this before having a final go.

        solrj-core will have to provide integration points for contribs in order to give access to internal core features. I think splitting SolrJ like this will help get more codes and ideas in and ultimately, Solr will benefit.

        Show
        Kayode Odeyemi added a comment - An initial spec on this will help us understand how to repackage SolrJ. We can leave room for more opinions on this before having a final go. solrj-core will have to provide integration points for contribs in order to give access to internal core features. I think splitting SolrJ like this will help get more codes and ideas in and ultimately, Solr will benefit.
        Hide
        Ryan McKinley added a comment -

        I think SimpleHttpSolrServer.java should just go in the same package/jar file, next to CommonsHttpSolrServer

        A client can remove the other .jar files if they don't want the HTTP dependencies

        Show
        Ryan McKinley added a comment - I think SimpleHttpSolrServer.java should just go in the same package/jar file, next to CommonsHttpSolrServer A client can remove the other .jar files if they don't want the HTTP dependencies
        Hide
        Jan Høydahl added a comment -

        I think we may need both, but for users not needing the extra power of commons-httpclient (such as SSL certificates) they could use the simple one and skip dependencies. Perhaps SolrJ could be split in two jars: solrj-core and solrj-extras, and have a policy that it's forbidden with external deps in core.

        Show
        Jan Høydahl added a comment - I think we may need both, but for users not needing the extra power of commons-httpclient (such as SSL certificates) they could use the simple one and skip dependencies. Perhaps SolrJ could be split in two jars: solrj-core and solrj-extras, and have a policy that it's forbidden with external deps in core.
        Hide
        Kayode Odeyemi added a comment -

        Patch is attached as requested.

        Having SolrJ without the deps will be great.

        It is possible to extend this to include other advanced features. I can work with the built-in implementations that makes use of common httpclient to understand the integration, then come up with similar implementation for this.

        Show
        Kayode Odeyemi added a comment - Patch is attached as requested. Having SolrJ without the deps will be great. It is possible to extend this to include other advanced features. I can work with the built-in implementations that makes use of common httpclient to understand the integration, then come up with similar implementation for this.
        Hide
        Jan Høydahl added a comment -

        This is great, Kayode. Would you be willing to donate your code to Solr? If so, please upload the java file, or even better, a patch file, to this ticket, and tick the ASF license checkbox.

        Then we must decide how to package this. I think power users may still need the full commonsHTTP thing (if they require SSL support or other advanced stuff) but having an official client without all the deps would be nice.

        Show
        Jan Høydahl added a comment - This is great, Kayode. Would you be willing to donate your code to Solr? If so, please upload the java file, or even better, a patch file, to this ticket, and tick the ASF license checkbox. Then we must decide how to package this. I think power users may still need the full commonsHTTP thing (if they require SSL support or other advanced stuff) but having an official client without all the deps would be nice.
        Show
        Kayode Odeyemi added a comment - Here's a working patch based off the above patch: https://github.com/charyorde/lucene-solr/blob/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/contrib/SimpleHttpSolrServer.java
        Hide
        Robert Muir added a comment -

        3.4 -> 3.5

        Show
        Robert Muir added a comment - 3.4 -> 3.5
        Hide
        Robert Muir added a comment -

        Bulk move 3.2 -> 3.3

        Show
        Robert Muir added a comment - Bulk move 3.2 -> 3.3
        Hide
        Hoss Man added a comment -

        Bulk updating 240 Solr issues to set the Fix Version to "next" per the process outlined in this email...

        http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E

        Selection criteria was "Unresolved" with a Fix Version of 1.5, 1.6, 3.1, or 4.0. email notifications were suppressed.

        A unique token for finding these 240 issues in the future: hossversioncleanup20100527

        Show
        Hoss Man added a comment - Bulk updating 240 Solr issues to set the Fix Version to "next" per the process outlined in this email... http://mail-archives.apache.org/mod_mbox/lucene-dev/201005.mbox/%3Calpine.DEB.1.10.1005251052040.24672@radix.cryptio.net%3E Selection criteria was "Unresolved" with a Fix Version of 1.5, 1.6, 3.1, or 4.0. email notifications were suppressed. A unique token for finding these 240 issues in the future: hossversioncleanup20100527
        Hide
        Shalin Shekhar Mangar added a comment -

        Marking for 1.5

        Show
        Shalin Shekhar Mangar added a comment - Marking for 1.5
        Hide
        Noble Paul added a comment -

        untested patch .

        Show
        Noble Paul added a comment - untested patch .
        Hide
        Shalin Shekhar Mangar added a comment -

        With SOLR-865 coming in, we can use binary format for both searching and indexing. The solr-commons jar has already been removed and merged with the solrj jar. I think a lightweight client makes sense once again. The only gotcha is that we require slf4j as a dependency.

        Show
        Shalin Shekhar Mangar added a comment - With SOLR-865 coming in, we can use binary format for both searching and indexing. The solr-commons jar has already been removed and merged with the solrj jar. I think a lightweight client makes sense once again. The only gotcha is that we require slf4j as a dependency.
        Hide
        Shalin Shekhar Mangar added a comment -

        Removing fix version 1.3 since this feature can take a lot of time to implement the multi-part post functionality correctly.

        Show
        Shalin Shekhar Mangar added a comment - Removing fix version 1.3 since this feature can take a lot of time to implement the multi-part post functionality correctly.
        Hide
        Shalin Shekhar Mangar added a comment -

        Right, I'll edit the description (again)

        Show
        Shalin Shekhar Mangar added a comment - Right, I'll edit the description (again)
        Hide
        Yonik Seeley added a comment -

        I thought commons-logging was only a dependency because HTTPClient used it.

        Show
        Yonik Seeley added a comment - I thought commons-logging was only a dependency because HTTPClient used it.

          People

          • Assignee:
            Noble Paul
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:

              Development