dsetool create_core
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
.
Restriction: Command is supported only on nodes with DSE Search workloads.
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
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
)
-
recovery=
(true
|false
)-
Whether to delete and recreate 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 recreating it. -
false
- Default.No recovery.
-
reindex=
(true
|false
)-
Whether to reindex the data when search indexes are auto-generated with
generateResources=true
. Reindexing works on a datacenter (DC) level. Reindex only once per search-enabled DC. Repeat the reindex command on other data centers as required.Valid values:
-
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.
-
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_data
table in the demo keyspace:
dsetool create_core demo.health_data generateResources=true
Override the default and reindex existing data, specify the reindex=false
option:
dsetool create_core demo.health_data generateResources=true reindex=false
The generateResources=true
option generates resources only if resources do not exist in the solr_resources
table.
Use options in a YAML-formatted file
To turn on live indexing, also known as real-time (RT) indexing, the contents of the rt.yaml
are rt: true
:
dsetool create_core udt_ks.users generateResources=true coreOptions=rt.yaml
Enable encryption with inline options
Specify the class for directoryFactory
to solr.EncryptedFSDirectoryFactory
:
dsetool create_core keyspace_name.table_name generateResources=true coreOptionsInline="directory_factory_class:solr.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 coreOptions="directory_factory_class:solr.EncryptedFSDirectoryFactory"