Re: Set router.field in unit tests
It's almost certainly worth using SolrCloudTestBase rather than AbstractDistribZkTestBase as well - normally makes the test five or six times faster. Alan Woodward www.flax.co.uk On 29 Apr 2016, at 17:11, Erick Erickson wrote: > I'm pretty sure you can just create a collection after the distributed > stuff is set up. > > Take a look at: > > CollectionsAPIDistributedZkTest.testNodesUsedByCreate to see creating > a collection > in your test just by a request (you can set any params you want there, > including > router.field). > > Or CollectionsAPISolrJTest.testCreateAndDeleteCollection for a niftier > builder pattern > SolrJ way. > > Best, > Erick > > On Fri, Apr 29, 2016 at 5:34 AM, GW wrote: >> Not exactly suer what you mean but I think you are wanting to change your >> schema.xml >> >> > multiValued="false" /> >> >> to >> >> > required="true" multiValued="false" /> >> >> >> restart solr >> >> >> On 29 April 2016 at 06:04, Markus Jelsma wrote: >> >>> Hi - any hints to share? >>> >>> Thanks! >>> Markus >>> >>> >>> >>> -Original message- >>>> From:Markus Jelsma >>>> Sent: Thursday 28th April 2016 13:30 >>>> To: solr-user >>>> Subject: Set router.field in unit tests >>>> >>>> Hi - i'm working on a unit test that requires the cluster's router.field >>> to be set to a field different than ID. But i can't find it?! How can i set >>> router.field with AbstractFullDistribZkTestBase? >>>> >>>> Thanks! >>>> Markus >>>> >>>
Re: Set router.field in unit tests
I'm pretty sure you can just create a collection after the distributed stuff is set up. Take a look at: CollectionsAPIDistributedZkTest.testNodesUsedByCreate to see creating a collection in your test just by a request (you can set any params you want there, including router.field). Or CollectionsAPISolrJTest.testCreateAndDeleteCollection for a niftier builder pattern SolrJ way. Best, Erick On Fri, Apr 29, 2016 at 5:34 AM, GW wrote: > Not exactly suer what you mean but I think you are wanting to change your > schema.xml > > multiValued="false" /> > > to > > required="true" multiValued="false" /> > > > restart solr > > > On 29 April 2016 at 06:04, Markus Jelsma wrote: > >> Hi - any hints to share? >> >> Thanks! >> Markus >> >> >> >> -Original message----- >> > From:Markus Jelsma >> > Sent: Thursday 28th April 2016 13:30 >> > To: solr-user >> > Subject: Set router.field in unit tests >> > >> > Hi - i'm working on a unit test that requires the cluster's router.field >> to be set to a field different than ID. But i can't find it?! How can i set >> router.field with AbstractFullDistribZkTestBase? >> > >> > Thanks! >> > Markus >> > >>
Re: Set router.field in unit tests
Not exactly suer what you mean but I think you are wanting to change your schema.xml to restart solr On 29 April 2016 at 06:04, Markus Jelsma wrote: > Hi - any hints to share? > > Thanks! > Markus > > > > -Original message- > > From:Markus Jelsma > > Sent: Thursday 28th April 2016 13:30 > > To: solr-user > > Subject: Set router.field in unit tests > > > > Hi - i'm working on a unit test that requires the cluster's router.field > to be set to a field different than ID. But i can't find it?! How can i set > router.field with AbstractFullDistribZkTestBase? > > > > Thanks! > > Markus > > >
RE: Set router.field in unit tests
Hi - any hints to share? Thanks! Markus -Original message- > From:Markus Jelsma > Sent: Thursday 28th April 2016 13:30 > To: solr-user > Subject: Set router.field in unit tests > > Hi - i'm working on a unit test that requires the cluster's router.field to > be set to a field different than ID. But i can't find it?! How can i set > router.field with AbstractFullDistribZkTestBase? > > Thanks! > Markus >
Set router.field in unit tests
Hi - i'm working on a unit test that requires the cluster's router.field to be set to a field different than ID. But i can't find it?! How can i set router.field with AbstractFullDistribZkTestBase? Thanks! Markus