Many thanks Timothy, I tried this today but ran into issues getting the
new collection to persist (so that I could search for the parameter).
It's good to have this confirmed as a viable approach though, and I'll
persevere with this tomorrow.
If I figure it out I'll reply with the details.
Thanks again,
Daniel
On 04/12/2013 17:41, Tim Potter wrote:
Hi Daniel,
I'm not sure how this would apply to an existing collection (in your case
collection1). Try using the collections API to create a new collection and pass
the router.field parameter. Grep'ing over the code, the parameter is named:
router.field (not routerField or routeField).
Cheers,
Timothy Potter
Sr. Software Engineer, LucidWorks
www.lucidworks.com
________________________________________
From: Daniel Bryant <daniel.bry...@tai-dev.co.uk>
Sent: Wednesday, December 04, 2013 9:40 AM
To: solr-user@lucene.apache.org
Subject: Setting routerField/shardKey on specific collection?
Hi,
I'm using Solr 4.6 and trying to specify a router.field (shard key) on a
specific collection so that all documents with the same value in the
specified field end up in the same collection.
However, I can't find an example of how to do this via the solr.xml? I
see in this ticket https://issues.apache.org/jira/browse/SOLR-5017 there
is a mention of a routeField property.
Should the solr.xml contain the following?
<cores adminPath="/admin/cores" defaultCoreName="collection1">
<core name="collection1" instanceDir="collection1"
routerField="consolidationGroupId" />
</cores>
Any help would be greatly appreciate? I've been yak shaving all
afternoon reading various Jira tickets and wikis trying to get this to
work :-)
Best wishes,
Daniel
--
*Daniel Bryant | Software Development Consultant | www.tai-dev.co.uk
<http://www.tai-dev.co.uk/>*
daniel.bry...@tai-dev.co.uk <mailto:daniel.bry...@tai-dev.co.uk> | +44
(0) 7799406399 | Twitter: @taidevcouk <https://twitter.com/taidevcouk>
--
*Daniel Bryant | Software Development Consultant | www.tai-dev.co.uk
<http://www.tai-dev.co.uk/>*
daniel.bry...@tai-dev.co.uk <mailto:daniel.bry...@tai-dev.co.uk> | +44
(0) 7799406399 | Twitter: @taidevcouk <https://twitter.com/taidevcouk>