Re: Are there roadblocks to creating custom DocRouter implementations?

2017-05-16 Thread Dorian Hoxha
Also interested in custom/pluggable routing.

On Tue, May 16, 2017 at 4:47 PM, Erick Erickson 
wrote:

> Hmmm, would the functionality be served by just using implicit routing
> putting the logic in creating the doc and populating the route field?
> Not, perhaps, as elegant as having some kind of pluggable routing I
> grant.
>
> Best,
> Erick
>
> On Tue, May 16, 2017 at 7:31 AM, Shawn Heisey  wrote:
> > There was a question in the #solr IRC channel about creating a custom
> > document router to assign documents to shards based on geolocation data.
> >
> > Looking into this, I think I see a roadblock or two standing in the way
> > of users creating custom router implementations.
> >
> > The "routerMap" field in the DocRouter class is private, and its
> > contents are not dynamically created.  It appears that only specific
> > names (null, plain, implicit, compositeId) are added to the map.
> >
> > I'm thinking that if we make routerMap protected (or create protected
> > access methods), and put "static { }" code blocks in each implementation
> > that add themselves to the parent routerMap, it will be much easier for
> > a user to create their own implementation and have it automatically
> > available to use in a CREATE action.
> >
> > Is this worth an issue in Jira?
> >
> > Thanks,
> > Shawn
> >
>


Re: Are there roadblocks to creating custom DocRouter implementations?

2017-05-16 Thread Erick Erickson
Hmmm, would the functionality be served by just using implicit routing
putting the logic in creating the doc and populating the route field?
Not, perhaps, as elegant as having some kind of pluggable routing I
grant.

Best,
Erick

On Tue, May 16, 2017 at 7:31 AM, Shawn Heisey  wrote:
> There was a question in the #solr IRC channel about creating a custom
> document router to assign documents to shards based on geolocation data.
>
> Looking into this, I think I see a roadblock or two standing in the way
> of users creating custom router implementations.
>
> The "routerMap" field in the DocRouter class is private, and its
> contents are not dynamically created.  It appears that only specific
> names (null, plain, implicit, compositeId) are added to the map.
>
> I'm thinking that if we make routerMap protected (or create protected
> access methods), and put "static { }" code blocks in each implementation
> that add themselves to the parent routerMap, it will be much easier for
> a user to create their own implementation and have it automatically
> available to use in a CREATE action.
>
> Is this worth an issue in Jira?
>
> Thanks,
> Shawn
>


Are there roadblocks to creating custom DocRouter implementations?

2017-05-16 Thread Shawn Heisey
There was a question in the #solr IRC channel about creating a custom
document router to assign documents to shards based on geolocation data.

Looking into this, I think I see a roadblock or two standing in the way
of users creating custom router implementations.

The "routerMap" field in the DocRouter class is private, and its
contents are not dynamically created.  It appears that only specific
names (null, plain, implicit, compositeId) are added to the map.

I'm thinking that if we make routerMap protected (or create protected
access methods), and put "static { }" code blocks in each implementation
that add themselves to the parent routerMap, it will be much easier for
a user to create their own implementation and have it automatically
available to use in a CREATE action.

Is this worth an issue in Jira?

Thanks,
Shawn