Thanks Noble - so it sounds like the v2 set-obj-property API can do
everything that the original action=CLUSTERPROP API can, and more?  So we
might be able to sunset the original API at some point?

Best,

Jason

On Wed, Oct 12, 2022 at 11:32 PM Noble Paul <noble.p...@gmail.com> wrote:

> they are essentially trying to achieve the same thing . however the v2 API
> can actually set deeply nested objects and the v2 API can only touch the
> single value attributes at the top level.
>
>
>
> On Thu, Oct 13, 2022 at 12:37 PM Jason Gerlowski <gerlowsk...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > I noticed recently that Solr has several overlapping APIs for modifying
> > what it calls "CLUSTERPROPS".  I think I understand the purpose of each
> of
> > these, but wanted to check here in case anyone had context to confirm or
> > correct me:
> >
> > /admin/collections?action=CLUSTERPROP (or POST /api/cluster
> {set-property:
> > {...}} in v2 parlance) updates /clusterprops.json in ZooKeeper and can
> only
> > be used to modify cluster properties one-at-a-time. [1] [2]
> >
> > POST /api/cluster {"set-obj-property": {...}} on the other hand (which
> has
> > no v1 equivalent) also updates the /clusterprops.json node in ZooKeeper,
> > but can be used to atomically update multiple properties simultaneously.
> > [3]
> >
> > My understanding is that there's no difference in these APIs, other than
> > the latter's ability to update multiple properties atomically - is that
> > correct?  If so, is there any reason to ever use
> > /admin/collections?action=CLUSTERPROP over its alternative, or do we see
> > the latter "set-obj-property" API as eventually supercedeing its
> > predecessor?
> >
> > Best,
> >
> > Jason
> >
> > [1]
> >
> >
> https://github.com/apache/solr/blob/02a1ff4b41d4d7abd0c017adc8d49f1a61e1e45b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java#L1041
> > [2]
> >
> >
> https://github.com/apache/solr/blob/f1f32d39ff715ddd325d873203e685655aa268d0/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java#L299
> > [3]
> >
> >
> https://github.com/apache/solr/blob/f1f32d39ff715ddd325d873203e685655aa268d0/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java#L286
> >
>
>
> --
> -----------------------------------------------------
> Noble Paul
>

Reply via email to