RE: How to routing document for send to particular shard range

2018-01-02 Thread hemanth
Hi Ketan,

I also tried various ways to route documents to different shards based on
some routing key value. eg:  status: active,inactive and terminated should
go to 3 different shards. I tried creating implicit as well as composite id
routers. I could not route the documents to the shard I want. Only thing
which we can achieve is , documents will be routed based on the hash values
of the field values. This will do automatically and it will not help to
manually route to the shard we need. The api documents looks little fuzzy
and I think solr will not route the documents to the desired shard manually.
I am referring 6.6 version. I also tried creating some dummy "_route_" field
and copied my status to this field and tried. But no luck. By any chance if
you got the solution. Please let me know. I think , it will be one of the
important feature , that can be enhanced. Creating different collections ,
just for the difference of one field is of not good option. for eg: if we
have sales documents, we want to partition them by sales country. i.e USA
sales in one shard and Canada sales in one shard etc.. For this case , we
need one collection with many shards and each shard should contain the data
only to that particular shard.

Thanks
Hemanth




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


RE: help on implicit routing

2017-12-25 Thread hemanth
I am trying here implicit routing and want to create a collection with 3
shards with names Active,Inactive and Terminated.  I created a _route_ field
in schema and copied my status field which contains Active or Inactive or
Terminated. I used copyfield in schema.xml to copy from status to _route_. I
specified _route_ as my route field in my implicit routing , while creating
a collection with implicit routing and shard names as Active,Inactive and
Terminated. But all my documents are still going to the same shard. Any hits
are highly appreciated.

Thanks
Hemanth



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: indexing data to solrcloud with "implicit" is not distributing across cluster.

2017-12-25 Thread hemanth
As per my understanding, distrib=false will be added in select query to
restrict the document selection to particular shard. But how should i route
the documents to only particular shard, is still my need.

Thanks
Hemanth



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: indexing data to solrcloud with "implicit" is not distributing across cluster.

2017-12-25 Thread hemanth
Hi Erik,
Thanks for your reply. I have no issues of using either Implicit or
Composite routing but I want to insert the documents to a particular shard,
so that when I want to query the data , I can hit a particular shard, which
gives me the results in lesser time as it hits only particular shard. So,
for eg: I am creating a collection with status as Active, Inactive and
Terminated. Let me think that my data at present is equally distributed ,
i.e Active 400 records, Inactive 300 records and Terminated also 300
records. I tried creating a collection with compositeId routing which
created shard1,shard2,shard3 , but when I indexed , all the documents went
to one shard only. I also created a collection with Implicit routing
mechanism with Active,Inactive and Terminated shard with routing key as
status. When I indexed the documents , again all went to single shard. I
want to route the documents based on some input value (with out based on the
hash value of the field , I specified, because both values may always lead
to same hash value and may point to store in same shard).  So , Please let
me know, how to route the documents to a particular shard based on composite
id or implicit mechanism, by using one of the existing field value or
extracting the content of the field before ! parameter. eg: if my field
value is "Active!otherfieldvalue" should go to Active shard and if my field
value is  "Inactive!othercontent" should go to Inactive shard.

Thanks
Hemanth

-Happy Christmas



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: indexing data to solrcloud with "implicit" is not distributing across cluster.

2017-12-15 Thread hemanth
I created a collection with implicit routing mechanism and my shared names
are Active and Disabled , these are the values of one of my collection
field: Status.  But when I am trying to upload the document using Solr UI
documents section : Upload using JSON format with all the fields including
field with value for Status as either Terminated or Active. It is going to
only one default shard. I tried to insert _route_ field with the value as
"Terminated" and when I try to insert the document , I am getting  

*unknown field '_route_' Error from server*. Am I trying in correct way?
Does the implicit routing works on the hash value of routing field and it
does not go to the shard based on the value of the routing field? 

I want to store the document with status field value : Active to
myCollectionn_Active shard and document with status field value: Terminated
to myCollection_Terminated shard automatically based on the value of my
status field in the document. I used implicit routing while creating
collection and given shard names as Active,Terminated. Plz help. I am using
Solr 6.6 version.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html