0

I am trying to set docValues as true on all the fields on the table to enable Sorting.

dsetool create_core keyspace.cf generateResources=true reindex=true coreOptionsInline=generate_docvalues_for_fields:'*'

But I am seeing the below error:

org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: while scanning an alias in 'string', line 1, column 32: generate_docvalues_for_fields: *

expected alphabetic or numeric character, but found but found

how do we generate SOLR core with docValues enabled for all fields?

saaia aiaas
  • 51
  • 1
  • 6

1 Answers1

3

Use "" to surround: coreOptionsInline="generate_docvalues_for_fields:'*'"

  • I don't see the docValues=true being set when using the CURL locahost:8983/solr/admin/cores?action=CREATE&name=keyspace.cf&generateResources=true&coreOptionsInline="generate_docvalues_for_fields:%27*%27" but see this option set when using the dsetool. Am I giving the options correctly – saaia aiaas Aug 30 '16 at 20:13
  • I think this is purely dsetool option, will not work with Solr API CREATE – Tomasz Lasica Aug 30 '16 at 20:48
  • Thanks Tomasz. Unfortunately our current design was to have API create for generating the core. – saaia aiaas Aug 30 '16 at 21:34
  • as a workaround I can suggest using `dsetool infer_solr_schema` with coreOptionsInline and pass schema to http API :-) Not sure if it is an option for you. – Tomasz Lasica Aug 31 '16 at 00:45
  • Thanks Tomasz. we are generating the schema now, pretty much like you suggested. – saaia aiaas Sep 12 '16 at 22:11