EvgenySalnikov
EvgenySalnikov

Reputation: 21

Solr 4.3.1 error "you must pass fillFields=true to IndexSearcher.search" on using group.query

I`m using solr-4.3.1 on ubuntu and start solr over jetty. I have custom schema.xml and all fields of query are in it. My collection "collection1" consists of 8 shards I try grouping data by some field and i use:

http://solr-node1:8983/solr/collection1/select/?q=*:*&group=true&group.field=rgn_str

Solr correct answer and provides the results, but when I try to use the group.query

http://solr-node1:8983/solr/collection1/select/?q=*:*&group=true&group.query=rgn_str:test

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

The documentation for solr I could not find how to specify this parameter. How to do it?

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. 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 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

Upvotes: 0

Views: 494

Answers (1)

EvgenySalnikov
EvgenySalnikov

Reputation: 21

"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." - Erick Erickson.

Great thank you to him for that.

Upvotes: 0

Related Questions