Re: Migrate Documents to Another Collection

2017-02-21 Thread Piyush Kunal
I have also noticed this issue and it happens while creating the collated
result. Mostly due to huge version mismatch between the server and client.

Best idea would be to use same server and client version.

Or else switch off collation (spell check you can still keep on) and do the
collation ( it's nothing but concat the spell checks) in your application
itself.

On 14-Feb-2017 7:34 am, "alias" <524839...@qq.com> wrote:

hi  I use solrj 5.5.0 to inquire solr3.6 reported the following error:
Java.lang.ClassCastException: java.lang.Boolean can not be cast to
org.apache.solr.common.util.NamedList
At org.apache.solr.client.solrj.response.SpellCheckResponse. 
(SpellCheckResponse.java:47)
At 
org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo
(QueryResponse.java:179)
At org.apache.solr.client.solrj.response.QueryResponse.setResponse
(QueryResponse.java:153)
At org.apache.solr.client.solrj.SolrRequest.process
(SolrRequest.java:149)
At org.apache.solr.client.solrj.SolrClient.query
(SolrClient.java:942)
At org.apache.solr.client.solrj.SolrClient.query
(SolrClient.java:957)
At com.vip.vipme.demo.utils.SolrTest.testCategoryIdPC
(SolrTest.java:66)
At com.vip.vipme.demo.SolrjServlet1.doGet (SolrjServlet1.java:33)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:707)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:820)
At org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:487)
At org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:362)
At org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
At org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
At org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
At org.mortbay.jetty.webapp.WebAppContext.handle
(WebAppContext.java:405)


If you set the query.set ("spellcheck", Boolean.FALSE); can solve this
problem,
But I would like to know what the specific reasons for this problem


thinks


Migrate Documents to Another Collection

2017-02-13 Thread alias
hi  I use solrj 5.5.0 to inquire solr3.6 reported the following error:
Java.lang.ClassCastException: java.lang.Boolean can not be cast to 
org.apache.solr.common.util.NamedList
At org.apache.solr.client.solrj.response.SpellCheckResponse.  
(SpellCheckResponse.java:47)
At 
org.apache.solr.client.solrj.response.QueryResponse.extractSpellCheckInfo 
(QueryResponse.java:179)
At org.apache.solr.client.solrj.response.QueryResponse.setResponse 
(QueryResponse.java:153)
At org.apache.solr.client.solrj.SolrRequest.process 
(SolrRequest.java:149)
At org.apache.solr.client.solrj.SolrClient.query (SolrClient.java:942)
At org.apache.solr.client.solrj.SolrClient.query (SolrClient.java:957)
At com.vip.vipme.demo.utils.SolrTest.testCategoryIdPC (SolrTest.java:66)
At com.vip.vipme.demo.SolrjServlet1.doGet (SolrjServlet1.java:33)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:707)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:820)
At org.mortbay.jetty.servlet.ServletHolder.handle 
(ServletHolder.java:487)
At org.mortbay.jetty.servlet.ServletHandler.handle 
(ServletHandler.java:362)
At org.mortbay.jetty.security.SecurityHandler.handle 
(SecurityHandler.java:216)
At org.mortbay.jetty.servlet.SessionHandler.handle 
(SessionHandler.java:181)
At org.mortbay.jetty.handler.ContextHandler.handle 
(ContextHandler.java:712)
At org.mortbay.jetty.webapp.WebAppContext.handle 
(WebAppContext.java:405)


If you set the query.set ("spellcheck", Boolean.FALSE); can solve this problem,
But I would like to know what the specific reasons for this problem


thinks

Migrate Documents to Another Collection

2017-02-09 Thread alias
hello
   please help me look this question ,Solr6.3 is the issue of the index 
migration (/admin/collections?Action=MIGRATE), I really do not know how to 
solve the hope that someone will help answer, very grateful


http://lucene.472066.n3.nabble.com/Migrate-Documents-to-Another-Collection-td4318900.html#a4318907

?????? Migrate Documents to Another Collection

2017-02-05 Thread alias
Sorry, I may not be clear enough to express, I describe the following 
experimental steps:
Step 1: Create two collections
Http://SOLR:8081/solr/admin/collections?action=CREATE=c1=3=2=3=myconf
Http://SOLR:8081/solr/admin/collections?action=CREATE=c2=3=2=3=myconf


Step 2: import test data, I only imported in c1 inside the collection, the data 
are as follows
"response":{"numFound":5,"start":0,"maxScore":1.0,"docs":[
  {
"id":"aa!c10",
"rowType":"like",
"title":["vip a red suit0"],
"description":["Your friend is your needs answered0"],
"_version_":1558553792955285504},
  {
"id":"bb!c11",
"rowType":"like",
"title":["vip a red suit1"],
"description":["Your friend is your needs answered1"],
"_version_":1558553792967868416},
  {
"id":"aa!c12",
"rowType":"like",
"title":["vip a red suit2"],
"description":["Your friend is your needs answered2"],
"_version_":1558553792968916992},
  {
"id":"bb!c13",
"rowType":"like",
"title":["vip a red suit3"],
"description":["Your friend is your needs answered3"],
"_version_":1558553792969965568},
  {
"id":"aa!c14",
"rowType":"like",
"title":["vip a red suit4"],
"description":["Your friend is your needs answered4"],
"_version_":1558553792971014144}]




Step 3: to achieve the merger order, I just want to have id 'aa' at the 
beginning of the data mobile past
Http://SOLR:8081/solr/admin/collections?action=MIGRATE=c1=aa!=c2



In the zookeeper C1 state.json has the following parameters:
 "RoutingRules": {"aa!": {
    "RouteRanges": "3710-3710",
"TargetCollection": "c2",
"ExpireAt": "1486353350933"}}



After the implementation of the third step, c1 data has not moved to c2 inside, 
c2 data is empty, which is why, is it where I operate incorrect? 

thinks all!




--  --
??: "Damien Kamerman";<dami...@gmail.com>;
????: 2017??2??6??(??) 11:33
??: "solr-user"<solr-user@lucene.apache.org>; 

: Re: Migrate Documents to Another Collection



Try with split.key=!
This will migrate all docs.

On 6 February 2017 at 14:31, alias <524839...@qq.com> wrote:

> I use this command,but not effect??  http://localhost:8081/solr/
> admin/collections?action=MIGRATE=c1
> key=c1_=c2,
>
>
>
> --  --
> ??: "Erick Erickson"<erickerick...@gmail.com>;
> : 2017??2??6??(??) 11:24
> ??: "solr-user"<solr-user@lucene.apache.org>;
> : Re: Migrate Documents to Another Collection
>
>
>
> I do not understand the problem. The http command you've shown is
> simply creating a collection. What does that have to do with migrating
> from c1 to c2? In fact, it is recreating c1. Assuming you haven't
> redefined the , then the router field defaults to "id". So
> this is just recreating a plain-vanilla collection. If you already
> have a "c1" collection, I expect the above would simply fail.
>
> There's nothing indicating you tried to move docs from C1 to C2 as the
> title of this e-mail indicates. There's no magic here, Solr
> collections are completely independent of one another. If you want
> docs to be moved, _you_ have to move them.
>
> Best,
> Erick
>
>
>
> On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> > hello,please help me look this question
> >
> >
> >
> > I have a solr collections on the merger, we would like to ask the next
> question is as follows I have two collections, c1 and c2,
> >
> > C1 colleciton there are 10 data, id is from c1_0 to c1_9,
> >
> > C2 colleciton also has 10 data, id is from c2_0 to c2_9,
> >
> > I now want to c1 id c1_ format data into the c2, I implemented the
> following order, it seems no effect, and why?
> >
> > I c1 designated in the new router.field=id
> >
> > http://localhost:8081/solr/admin/collections?action=
> CREATEname=c1numShards=3=3=3&
> collection.configName=myconfrouter.field=id
> >
> > I refer to https://cwiki.apache.org/confluence/display/solr/
> Collections+API#CollectionsAPI-api12
> >
> > Solr version 6.3.0
> >
> > I have a problem? Or understanding wrong?
>

Re: Migrate Documents to Another Collection

2017-02-05 Thread Damien Kamerman
Try with split.key=!
This will migrate all docs.

On 6 February 2017 at 14:31, alias <524839...@qq.com> wrote:

> I use this command,but not effect:  http://localhost:8081/solr/
> admin/collections?action=MIGRATE=c1
> key=c1_=c2,
>
>
>
> -- 原始邮件 --
> 发件人: "Erick Erickson"<erickerick...@gmail.com>;
> 发送时间: 2017年2月6日(星期一) 中午11:24
> 收件人: "solr-user"<solr-user@lucene.apache.org>;
> 主题: Re: Migrate Documents to Another Collection
>
>
>
> I do not understand the problem. The http command you've shown is
> simply creating a collection. What does that have to do with migrating
> from c1 to c2? In fact, it is recreating c1. Assuming you haven't
> redefined the , then the router field defaults to "id". So
> this is just recreating a plain-vanilla collection. If you already
> have a "c1" collection, I expect the above would simply fail.
>
> There's nothing indicating you tried to move docs from C1 to C2 as the
> title of this e-mail indicates. There's no magic here, Solr
> collections are completely independent of one another. If you want
> docs to be moved, _you_ have to move them.
>
> Best,
> Erick
>
>
>
> On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> > hello,please help me look this question
> >
> >
> >
> > I have a solr collections on the merger, we would like to ask the next
> question is as follows I have two collections, c1 and c2,
> >
> > C1 colleciton there are 10 data, id is from c1_0 to c1_9,
> >
> > C2 colleciton also has 10 data, id is from c2_0 to c2_9,
> >
> > I now want to c1 id c1_ format data into the c2, I implemented the
> following order, it seems no effect, and why?
> >
> > I c1 designated in the new router.field=id
> >
> > http://localhost:8081/solr/admin/collections?action=
> CREATEname=c1numShards=3=3=3&
> collection.configName=myconfrouter.field=id
> >
> > I refer to https://cwiki.apache.org/confluence/display/solr/
> Collections+API#CollectionsAPI-api12
> >
> > Solr version 6.3.0
> >
> > I have a problem? Or understanding wrong?
>


?????? Migrate Documents to Another Collection

2017-02-05 Thread alias
I use this command,but not effect??  
http://localhost:8081/solr/admin/collections?action=MIGRATE=c1=c1_=c2,



--  --
??: "Erick Erickson"<erickerick...@gmail.com>; 
: 2017??2??6??(??) 11:24
??: "solr-user"<solr-user@lucene.apache.org>; 
: Re: Migrate Documents to Another Collection



I do not understand the problem. The http command you've shown is
simply creating a collection. What does that have to do with migrating
from c1 to c2? In fact, it is recreating c1. Assuming you haven't
redefined the , then the router field defaults to "id". So
this is just recreating a plain-vanilla collection. If you already
have a "c1" collection, I expect the above would simply fail.

There's nothing indicating you tried to move docs from C1 to C2 as the
title of this e-mail indicates. There's no magic here, Solr
collections are completely independent of one another. If you want
docs to be moved, _you_ have to move them.

Best,
Erick



On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> hello,please help me look this question
>
>
>
> I have a solr collections on the merger, we would like to ask the next 
> question is as follows I have two collections, c1 and c2,
>
> C1 colleciton there are 10 data, id is from c1_0 to c1_9,
>
> C2 colleciton also has 10 data, id is from c2_0 to c2_9,
>
> I now want to c1 id c1_ format data into the c2, I implemented the following 
> order, it seems no effect, and why?
>
> I c1 designated in the new router.field=id
>
> http://localhost:8081/solr/admin/collections?action=CREATEname=c1numShards=3=3=3=myconfrouter.field=id
>
> I refer to 
> https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api12
>
> Solr version 6.3.0
>
> I have a problem? Or understanding wrong?

Re: Migrate Documents to Another Collection

2017-02-05 Thread Erick Erickson
I do not understand the problem. The http command you've shown is
simply creating a collection. What does that have to do with migrating
from c1 to c2? In fact, it is recreating c1. Assuming you haven't
redefined the , then the router field defaults to "id". So
this is just recreating a plain-vanilla collection. If you already
have a "c1" collection, I expect the above would simply fail.

There's nothing indicating you tried to move docs from C1 to C2 as the
title of this e-mail indicates. There's no magic here, Solr
collections are completely independent of one another. If you want
docs to be moved, _you_ have to move them.

Best,
Erick



On Sun, Feb 5, 2017 at 6:20 PM, alias <524839...@qq.com> wrote:
> hello,please help me look this question
>
>
>
> I have a solr collections on the merger, we would like to ask the next 
> question is as follows I have two collections, c1 and c2,
>
> C1 colleciton there are 10 data, id is from c1_0 to c1_9,
>
> C2 colleciton also has 10 data, id is from c2_0 to c2_9,
>
> I now want to c1 id c1_ format data into the c2, I implemented the following 
> order, it seems no effect, and why?
>
> I c1 designated in the new router.field=id
>
> http://localhost:8081/solr/admin/collections?action=CREATE=c1=3=3=3=myconf=id
>
> I refer to 
> https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api12
>
> Solr version 6.3.0
>
> I have a problem? Or understanding wrong?


Migrate Documents to Another Collection

2017-02-05 Thread alias
hello,please help me look this question 



I have a solr collections on the merger, we would like to ask the next question 
is as follows I have two collections, c1 and c2,

C1 colleciton there are 10 data, id is from c1_0 to c1_9,

C2 colleciton also has 10 data, id is from c2_0 to c2_9,

I now want to c1 id c1_ format data into the c2, I implemented the following 
order, it seems no effect, and why?

I c1 designated in the new router.field=id

http://localhost:8081/solr/admin/collections?action=CREATE=c1=3=3=3=myconf=id

I refer to 
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api12

Solr version 6.3.0

I have a problem? Or understanding wrong?

Migrate Documents to Another Collection

2017-02-05 Thread alias
hello,please help me look this question 
"https://issues.apache.org/jira/browse/SOLR-10097;