Thank you!
I really need to eventually increase the number of shards, so I can not
directly use numshards = X and the only way out - splitshards, but then I
encountered the following problem:

1. run empty node1
    java -Dbootstrap_confdir=./solr/collection1/conf
-Dcollection.configName=myconf -DzkRun -jar start.jar -DnumShards=1
2. run empty node2
    java -Djetty.port=7574 -DzkHost=localhost:9983 -jar start.jar
3. cluster is - collection1 -> shard1 -> master (node1) and replica (node2)
4. add some data (10 docs)
5. http://node1:8983/solr/collection1/select?q=*:*
    <response>
        <lst name="responseHeader">
            <int name="status">0</int>
            <int name="QTime">5</int>
            <lst name="params">
                <str name="q">*:*</str>
            </lst>
        </lst>
    <result name="response" numFound="10" start="0">
        <doc>...</doc>
        <doc>...</doc>
    </result>
    </response>
6. try group.query
http://node1:8983/solr/collection1/select?q=*:*&group=true&group.query=street:%D0%9A%D0%BE%D1%80%D0%BE%D0%BB%D0%B5%D0%B2%D0%B0
    <response>
        <lst name="responseHeader">
        <int name="status">0</int>
        <int name="QTime">13</int>
        <lst name="params">
            <str name="q">*:*</str>
            <str name="group.query">street:Королева</str>
            <str name="group">true</str>
        </lst>
        </lst>
        <lst name="grouped">
        <lst name="street:Королева">
        <int name="matches">10</int>
    <result name="doclist" numFound="10" start="0">
    <doc>
        <str name="id">cdb1c990-d00c-4d2c-95ba-4f496e559be3</str>
        <str name="street">Королева</str>
        <str name="house">7</str>
        <int name="number">62</int>
        <str name="owner">Сидоров</str>
        <str name="note">Дела отлично!</str>
        <long name="_version_">1440614179417358336</long>
    </doc>
    </result>
    </lst>
    </lst>
    </response>
7. try split shard1
http://node1:8983/solr/admin/collections?action=SPLITSHARD&collection=collection1&shard=shard1
<response>
 <lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">9288</int>
 </lst>
 <lst name="success">
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">2441</int>
   </lst>
   <str name="core">collection1_shard1_1_replica1</str>
   <str
name="saved">/home/evgenysalnikov/solrtest/node1/example/solr/solr.xml</str>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">2479</int>
   </lst>
   <str name="core">collection1_shard1_0_replica1</str>
   <str
name="saved">/home/evgenysalnikov/solrtest/node1/example/solr/solr.xml</str>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">5002</int>
   </lst>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">5002</int>
   </lst>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">141</int>
   </lst>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">0</int>
   </lst>
   <str name="core">collection1_shard1_0_replica1</str>
   <str name="status">EMPTY_BUFFER</str>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">1</int>
   </lst>
   <str name="core">collection1_shard1_1_replica1</str>
   <str name="status">EMPTY_BUFFER</str>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">2515</int>
   </lst>
   <str name="core">collection1_shard1_1_replica2</str>
   <str
name="saved">/home/evgenysalnikov/solrtest/node2/example/solr/solr.xml</str>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">2554</int>
   </lst>
   <str name="core">collection1_shard1_0_replica2</str>
   <str
name="saved">/home/evgenysalnikov/solrtest/node2/example/solr/solr.xml</str>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">4001</int>
   </lst>
  </lst>
  <lst>
   <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">4002</int>
   </lst>
  </lst>
 </lst>
</response>
8. Claster state change to
    shard1 - master (inactive),
    shard1 - slave (inactive)
    shard1_0 - master,
    shard1_0 - slave,
    shard1_1 - master,
    shard1_1 - slave
9. Commit http://node1:8983/solr/collection1/update?commit=true
10. Reload http://node1:8983/solr/collection1/select?q=*:* gives me
different results numFound 5,0,10 (i add 10 docs)
    Node2 core info is
    collection1 - shard1 - 10 docs
    collection1_shard1_0_replica2 - 0 docs
    collection1_shard1_1_replica2 - 0 docs
11. I restart node2
   Node2 core info is
   collection1 - shard1 - 10 docs
   collection1_shard1_0_replica2 - 5 docs
   collection1_shard1_1_replica2 - 5 docs
12. http://node1:8983/solr/collection1/select?q=*:* always gives the
correct result - 10 documents

But
http://node1:8983/solr/collection1/select?q=*:*&group=true&group.query=street:%D0%9A%D0%BE%D1%80%D0%BE%D0%BB%D0%B5%D0%B2%D0%B0
returns the familiar error
shard 0 did not set sort field values (FieldDoc.fields is null); you must
pass fillFields=true to IndexSearcher.search on each shard

I somehow did not operate correctly splitshard?


Also, I tried once to indicate the number of shard 2
1. run empty node1
    java -Dbootstrap_confdir=./solr/collection1/conf
-Dcollection.configName=myconf -DzkRun -jar start.jar -DnumShards=2
2. run empty node2
    java -Djetty.port=7574 -DzkHost=localhost:9983 -jar start.jar
3. cluster is - collection1 -> shard1 -> master (node1) and collection1 ->
shard2 -> master (node2)
4. add some data (10 docs)
5. http://node1:8983/solr/collection1/select?q=*:*
    <response>
        <lst name="responseHeader">
            <int name="status">0</int>
            <int name="QTime">5</int>
            <lst name="params">
                <str name="q">*:*</str>
            </lst>
        </lst>
    <result name="response" numFound="10" start="0">
        <doc>...</doc>
        <doc>...</doc>
    </result>
    </response>
6. try group.query
http://node1:8983/solr/collection1/select?q=*:*&group=true&group.query=street:%D0%9A%D0%BE%D1%80%D0%BE%D0%BB%D0%B5%D0%B2%D0%B0

error
shard 0 did not set sort field values (FieldDoc.fields is null); you must
pass fillFields=true to IndexSearcher.search on each shard


Thanks in advance,
Evgeny


2013/7/13 Erick Erickson <erickerick...@gmail.com>

> Wait, you can't do this. You're changing the number
> of shards? Your original startup specified a single shard,
> bringing up another node and calling it "shard2" isn't
> consistent.
>
> If you'd brought up a single shard while telling SolrCloud that
> there were 2 shards, you shouldn't have been able to index
> anything.
>
> So what are you trying to do? Create your cluster with the
> number of shards you intend it to have. Or split shards. Or
> something, but just bringing up a second node and calling
> it "shard2" isn't supported.
>
> Best
> Erick
>
> On Fri, Jul 12, 2013 at 7:43 AM, Evgeny Salnikov <evg...@salnikoff.com>
> wrote:
> > Hi!
> >
> > To repeat the problem, do the following
> >
> > 1. Start a node1 of SolrCloud (4.3.1 default configs) (java
> > -Dbootstrap_confdir=./solr/collection1/conf
> -Dcollection.configName=myconf
> > -DzkRun -jar start.jar)
> > 2. Import to collection1 -> shard1 some data
> > 3. Try group.query e.g.
> >
> http://node1:8983/solr/collection1/select?q=*:*&group=true&group.query=someFiled:someValue
> .
> > it is important to have hit on index data.
> > 4. The result is, there is no error
> > 5. Start a node2 of SolrCloud (java -Djetty.port=7574
> > -DzkHost=localhost:9983 -jar start.jar)
> > 6. On node2 add new core for collection1 -> shard2. Default core
> > "collection1" unload. We have one collection over two shard. Shard1 -
> have
> > data, shard2 - no data.
> > 7. Again try group.query
> >
> http://node1:8983/solr/collection1/select?q=*:*&group=true&group.query=someFiled:someValue
> > .
> > 8. Error: shard 0 did not set sort field values (FieldDoc.fields is
> null);
> > you must pass fillFields=true to IndexSearcher.search on each shard
> >
> > How i can set "fillFields=true to IndexSearcher.search" ?
> >
> > Thanks in advance,
> > Evgeny
>



-- 
>8[]

Reply via email to