dsetool create_core
|
This command is supported only on nodes with DSE Search workloads. |
Creates the search index table on the local node.
Supports DSE authentication with [-l username -p password].
The CQL command to create a search index is CREATE SEARCH INDEX.
Auto-generated schemas have default DocValues enabled.
See Creating a search index with default values for details on docValues.
|
If one or more nodes fail to create the search index in distributed operations, an error message indicates the failing node or nodes. If it failed to create the search index immediately, issue the create again. If it failed to create on some nodes, issue a reload for those nodes to load the newly created search index. |
Synopsis
dsetool create_core keyspace_name.table_name
[coreOptions=yamlFile | coreOptionsInline=key1:value1\#key2:value2\#...]
[distributed=(true|false)]
[(generateResources=(true|false)] | schema=path solrconfig=path)]
[recovery=(true|false)]
[reindex=(true|false)]
| Syntax conventions | Description |
|---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a valid option or user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
|
Set, list, map, or tuple.
Angle brackets ( |
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrconfig files. |
keyspace_name.table_name-
Required. The keyspace and table names of the search index. Keyspace and table names are case-sensitive. Enclose names that contain uppercase in double quotation marks.
coreOptions=yamlFile-
When
generateResources=true, specify a customized YAML-formatted file of options. The contents of the file are the same options that can be specified withcoreOptionsInline. coreOptionsInline=key1:value1#key2:value2#…-
Use this key-value pair syntax
key1:value1#key2:value2#to specify values for these settings:-
auto_soft_commit_max_time:ms -
default_query_field:field -
distributed:(true|false) -
enable_string_copy_fields:(true|false) -
exclude_columns: col1,col2,col3,… -
generate_DocValues_for_fields:(*|field1,field2,…) -
generateResources:(true|false)
-
- distributed=(true|false)
-
Whether to distribute and apply the operation to all nodes in the local datacenter.
-
false: Applies the operation only to the node it was sent to. For
dsetool create_core, this works only whenrecovery=true. -
true (default): Applies the operation to all nodes in the local datacenter.
Distributing a re-index to an entire datacenter degrades performance severely in that datacenter.
Even with
distributed=true, reindexing is limited to the single datacenter where you run the command. You must reindex any other search-enabled datacenters separately. -
recovery=(true|false)-
Whether to delete and re-create the search index if it is not able to load due to corruption. Valid values:
-
true- If search index is unable to load, recover the index by deleting and re-creating it. -
false- Default.No recovery.
-
- reindex=(true|false)
-
Whether to reindex the data when search indexes are auto-generated with
generateResources=true.-
true(default): Reindexes the data. Accepts reads and keeps the current search index while the new index is building. -
false: Does not reindex the data. You can check and customize search index resources before indexing.
Reindexing works at the datacenter (DC) level. It runs only in the DC where you run the command, even when
distributed=true. Other search-enabled DCs are not reindexed.For a cluster with more than one search DC, run
dsetool reload_core <keyspace_name>.<table_name> reindex=truein each of the other search DCs. -
schema=path-
Path of the UTF-8 encoded search index schema file. Cannot be specified when
generateResources=true.To ensure that non-indexed fields in the table are retrievable by queries, you must include those fields in the schema file. For more information, see Solr single-pass CQL queries.
solrconfig=path-
Path of the UTF-8 encoded search index configuration file. Cannot be specified when
generateResources=true.
Examples
- Automatically generate search index for the
health_datatable in the demo keyspace -
dsetool create_core demo.health_data generateResources=true - Override the default and reindex existing data, specify the
reindex=falseoption -
dsetool create_core demo.health_data generateResources=true reindex=falseThe
generateResources=trueoption generates resources only if resources do not exist in thesolr_resourcestable. - Use options in a YAML-formatted file
-
To turn on live indexing, also known as real-time (RT) indexing, the contents of the
rt.yamlarert: true:dsetool create_core udt_ks.users generateResources=true coreOptions=rt.yaml - Enable encryption with inline options
-
Specify the class for
directoryFactorytosolr.EncryptedFSDirectoryFactory:dsetool create_core demo.health_data generateResources=true coreOptionsInline="directory_factory_class:solr.EncryptedFSDirectoryFactory" - Use options in a YAML-formatted file
-
dsetool create_core demo.health_data generateResources=true coreOptions="directory_factory_class:solr.EncryptedFSDirectoryFactory"