Creating a core with automatic resource generation
An existing CQL table is required to create a core with automatic resource generation. Options are available to generate resources automatically.
The prerequisite for creating a core with automatic resource generation is an existing CQL table. DSE Search automatically generates default solrconfig.xml and schema.xml files that are based on the table metadata. You can generate resources automatically, using an HTTP POST request or a dsetool command and the generateResources option. The following list describes the options for generating resources automatically:
dsetool syntax
The dsetool syntax for generating resources automatically and creating the Solr core is:
$ dsetool create_core keyspace.table generateResources=true [option ...]
User credentials can be provided in several ways, see Providing credentials for authentication.
$ dsetool create_core nhanes_ks.nhanes generateResources=true
By default, when you automatically generate resources, existing data is not reindexed. You can check and customize the resources before indexing.
See dsetool create_core for details on command options.
To override the default and reindex existing data, use the reindex=true option:
$ dsetool create_core nhanes_ks.nhanes generateResources=true reindex=true
DataStax Enterprise uses the type mapping in Mapping of Solr types to generate the CQL-based core and resources. To generate resources automatically, the CQL table can consist of keys and columns of any CQL data type. However, decimal and varint are indexed as strings. Lucene does not support the precision required by these numeric types. Range and sorting queries do not work as expected if a table uses these types.
To use DocValues, enable it for a field; define a field type and then define fields of that type with DocValues enabled in the schema file.
DocValues enabled by default
Field cache is off by default.
- Any Solr type extending TrieField
- TrieDoubleField
- TrieFloatField
- TrieIntField
- TrieLongField
- Any Solr type extending UUIDField
- TimeUUIDField
- Any Solr of type StrField or extending StrField
- StrField
- AsciiStrField
- DecimalStrField
- InetField
- VarintStrField
This DocValues default behavior also applies to copyField destination fields that are of type StrField.