lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SOLR-8947) CloudSolrClient should direct route docs for implicit router when router.field is set or throw an error
Date Tue, 05 Apr 2016 20:59:25 GMT
David Smiley created SOLR-8947:
----------------------------------

             Summary: CloudSolrClient should direct route docs for implicit router when router.field
is set or throw an error
                 Key: SOLR-8947
                 URL: https://issues.apache.org/jira/browse/SOLR-8947
             Project: Solr
          Issue Type: Improvement
          Components: clients - java
            Reporter: David Smiley


{{CloudSolrClient.directUpdate()}} has this "optimization":
{code}
    if (router instanceof ImplicitDocRouter) {
      // short circuit as optimization
      return null;
    }
{code}
Presumably this was correct prior to {{router.field}} became a way for one to choose where
docs go for the implicit router.  Instead, this code should continue normally if router.field
is set.  

If it's _not_ set, this code could return null. But then what should the caller do?  It appears
that if {{\_route_\}} is set then that spells out where the doc will go, _otherwise it'll
go to all shards_.  The all-shards behavior is quite likely a gotcha/error but there's perhaps
a slim chance someone wants this behavior?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message