FAQ
Hi,
Trying to migrate from HttpSolrServer to CloudSolrServer. getting the
following exception while adding docs using CloudSolrServer.


org.apache.solr.common.SolrException: Unknown document router
'{name=compositeId}'

at org.apache.solr.common.cloud.DocRouter.getDocRouter(DocRouter.java:46)

whereas my cluterstate json says --

   "maxShardsPerNode":"1",
     "router":{"name":"compositeId"},
     "replicationFactor":"1".


please advice.

PS : i'm using solr 4.10.4.

Thanks,
Naveen.

Search Discussions

  • Shawn Heisey at Jun 9, 2016 at 6:12 am

    On 6/8/2016 11:44 PM, Naveen Pajjuri wrote:
    Trying to migrate from HttpSolrServer to CloudSolrServer. getting the
    following exception while adding docs using CloudSolrServer.


    org.apache.solr.common.SolrException: Unknown document router
    '{name=compositeId}'

    at org.apache.solr.common.cloud.DocRouter.getDocRouter(DocRouter.java:46)

    whereas my cluterstate json says --

    "maxShardsPerNode":"1",
    "router":{"name":"compositeId"},
    "replicationFactor":"1".
    I am guessing that you are using a much older version of SolrJ than the
    Solr version it is talking to. The '{"name":"compositeId"}' structure
    appears to be the way that newer versions of Solr record the router in
    zookeeper, which is something that the older versions of SolrJ will not
    know how to handle.

    Mixing different versions of Solr and SolrJ will work very well, as long
    as you're not using the cloud client. That client is so tightly coupled
    to SolrCloud internals that it does not work well with a large version
    difference, especially if the client is older than the server.

    Most likely you'll need to upgrade your SolrJ version. At the same
    time, switching to CloudSolrClient is probably a good idea -- the class
    names that end in Server are deprecated in 5.x and gone in 6.x.

    Thanks,
    Shawn
  • Naveen Pajjuri at Jun 9, 2016 at 8:16 am
    Thanks *Shawn.*
    i was using older version of solrj. upgrading it to newer version worked.

    Thank you.
    On Thu, Jun 9, 2016 at 11:41 AM, Shawn Heisey wrote:
    On 6/8/2016 11:44 PM, Naveen Pajjuri wrote:
    Trying to migrate from HttpSolrServer to CloudSolrServer. getting the
    following exception while adding docs using CloudSolrServer.


    org.apache.solr.common.SolrException: Unknown document router
    '{name=compositeId}'

    at org.apache.solr.common.cloud.DocRouter.getDocRouter(DocRouter.java:46)

    whereas my cluterstate json says --

    "maxShardsPerNode":"1",
    "router":{"name":"compositeId"},
    "replicationFactor":"1".
    I am guessing that you are using a much older version of SolrJ than the
    Solr version it is talking to. The '{"name":"compositeId"}' structure
    appears to be the way that newer versions of Solr record the router in
    zookeeper, which is something that the older versions of SolrJ will not
    know how to handle.

    Mixing different versions of Solr and SolrJ will work very well, as long
    as you're not using the cloud client. That client is so tightly coupled
    to SolrCloud internals that it does not work well with a large version
    difference, especially if the client is older than the server.

    Most likely you'll need to upgrade your SolrJ version. At the same
    time, switching to CloudSolrClient is probably a good idea -- the class
    names that end in Server are deprecated in 5.x and gone in 6.x.

    Thanks,
    Shawn

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsolr-user @
categorieslucene
postedJun 9, '16 at 5:44a
activeJun 9, '16 at 8:16a
posts3
users2
websitelucene.apache.org...

2 users in discussion

Naveen Pajjuri: 2 posts Shawn Heisey: 1 post

People

Translate

site design / logo © 2019 Grokbase