dsetool get_core_schema
Displays the XML for the pending or active search index schema.
Supports DSE authentication with [-l <username> -p <password>]
.
Restriction: Command is supported only on nodes with DSE Search workloads.
Synopsis
dsetool get_core_schema <keyspace_name>.<table_name> [current=true|false]
Syntax conventions | Description |
---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
<`Italics>` |
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.
- current=true|false
-
Optionally specify to view the current (active) schema.
-
true - Returns the current live search index schema.
-
false - Default. Returns the latest uploaded search index schema.
-
Examples
The following examples view the search index schema for the demo keyspace and health_data table.
To save the XML output to a file:
dsetool get_core_schema demo.health_data > /Users/maryjoe/Documents/search/health_data_schema.xml
The health_data_schema.xml file is created.
To view the pending (latest uploaded) search index schema:
dsetool get_core_schema demo.health_data
To view the active (currently loaded) search index schema:
dsetool get_core_schema demo.health_data current=true
The XML for the schema is displayed:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<schema name="autoSolrSchema" version="1.5">
<types>
<fieldType class="org.apache.solr.schema.TextField" name="TextField">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType class="org.apache.solr.schema.TrieIntField" name="TrieIntField"/>
</types>
<fields>
<field indexed="true" multiValued="false" name="grade_completed" stored="true" type="TextField"/>
...
<field indexed="true" multiValued="false" name="fips" stored="true" type="TextField"/>
</fields>
<uniqueKey>(id,age)</uniqueKey>
</schema>