DESCRIBE SEARCH INDEX

Provides the definition of specified search index in XML format.

Provides the definition of specified search index in XML format.
Restriction: Command available only on DSE Search nodes. Running search index management commands on a large datasets may take longer than the CQLSH default timeout of 10 minutes, increase the CQLSH client timeout as required.

Synopsis

DESCRIBE (PENDING|ACTIVE) SEARCH INDEX (SCHEMA|CONFIG)
ON [keyspace_name.]table_name
Legend
Syntax conventions Description
UPPERCASE Literal keyword.
Lowercase Not literal.
Italics Variable value. Replace with a user-defined value.
[] Optional. Square brackets ( [] ) surround optional command arguments. Do not type the square brackets.
( ) Group. Parentheses ( ( ) ) identify a group to choose from. Do not type the parentheses.
| Or. A vertical bar ( | ) separates alternative elements. Type any one of the elements. Do not type the vertical bar.
... Repeatable. An ellipsis ( ... ) indicates that you can repeat the syntax element as often as required.
'Literal string' Single quotation ( ' ) marks must surround literal strings in CQL statements. Use single quotation marks to preserve upper case.
{ key : value } Map collection. Braces ( { } ) enclose map collections or key value pairs. A colon separates the key and the value.
<datatype1,datatype2> Set, list, map, or tuple. Angle brackets ( < > ) enclose data types in a set, list, map, or tuple. Separate the data types with a comma.
cql_statement; End CQL statement. A semicolon ( ; ) terminates all CQL statements.
[--] Separate the command line options from the command arguments with two hyphens ( -- ). This syntax is useful when arguments might be mistaken for command line options.
' <schema> ... </schema> ' Search CQL only: Single quotation marks ( ' ) surround an entire XML schema declaration.
@xml_entity='xml_entity_type' Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files.

EBNF

EBNF syntax:
describeSearchIndex ::= 'DESCRIBE' ('PENDING' | 'ACTIVE') 'SEARCH' 'INDEX’
                        'ON' tableName
tableName           ::= (keyspace '.')? Table

Railroad diagram:

describeSearchIndex
Image shows a railroad diagram for the DESCRIBE SEARCH INDEX search CQL command

tableName
Image shows a railroad diagram of tableName

ACTIVE

Index configuration resources that are currently applied. Pending search index changes are made active with RELOAD SEARCH INDEX.

PENDING
Index configuration resources that pending but not yet applied.
  • Search index changes are pending after CREATE SEARCH INDEX or ALTER SEARCH INDEX.
  • Pending search index changes are made active with RELOAD SEARCH INDEX.
SCHEMA

Describe the fields to index in Solr and types associated with them. These fields map to database columns.

CONFIG

Describe the configuration information for the index.

Examples

Show the active index config for wiki.solr:
DESCRIBE ACTIVE SEARCH INDEX CONFIG ON demo.health_data;
The results are shown in XML:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<config>
  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
  <luceneMatchVersion>LUCENE_6_0_0</luceneMatchVersion>
  <dseTypeMappingVersion>2</dseTypeMappingVersion>
  <directoryFactory class="solr.StandardDirectoryFactory" name="DirectoryFactory"/>
  <indexConfig>
    <rt>false</rt>
    <rtOffheapPostings>true</rtOffheapPostings>
    <useCompoundFile>false</useCompoundFile>
    <ramBufferSizeMB>512</ramBufferSizeMB>
    <mergeFactor>10</mergeFactor>
    <reopenReaders>true</reopenReaders>
    <deletionPolicy class="solr.SolrDeletionPolicy">
      <str name="maxCommitsToKeep">1</str>
      <str name="maxOptimizedCommitsToKeep">0</str>
    </deletionPolicy>
    <infoStream file="INFOSTREAM.txt">false</infoStream>
  </indexConfig>
  <jmx/>
  <updateHandler class="solr.DirectUpdateHandler2">
    <autoSoftCommit>
      <maxTime>10000</maxTime>
    </autoSoftCommit>
  </updateHandler>
  <query>
    <maxBooleanClauses>1024</maxBooleanClauses>
    <filterCache class="solr.SolrFilterCache" highWaterMarkMB="2048" lowWaterMarkMB="1024"/>
    <enableLazyFieldLoading>true</enableLazyFieldLoading>
    <useColdSearcher>true</useColdSearcher>
    <maxWarmingSearchers>16</maxWarmingSearchers>
  </query>
  <requestDispatcher handleSelect="true">
    <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000"/>
    <httpCaching never304="true"/>
  </requestDispatcher>
  <requestHandler class="solr.SearchHandler" default="true" name="search">
    <lst name="defaults">
      <int name="rows">10</int>
    </lst>
  </requestHandler>
  <requestHandler class="com.datastax.bdp.search.solr.handler.component.CqlSearchHandler" name="solr_query">
    <lst name="defaults">
      <int name="rows">10</int>
    </lst>
  </requestHandler>
  <requestHandler class="solr.UpdateRequestHandler" name="/update"/>
  <requestHandler class="solr.UpdateRequestHandler" name="/update/csv" startup="lazy"/>
  <requestHandler class="solr.UpdateRequestHandler" name="/update/json" startup="lazy"/>
  <requestHandler class="solr.FieldAnalysisRequestHandler" name="/analysis/field" startup="lazy"/>
  <requestHandler class="solr.DocumentAnalysisRequestHandler" name="/analysis/document" startup="lazy"/>
  <requestHandler class="solr.admin.AdminHandlers" name="/admin/"/>
  <requestHandler class="solr.PingRequestHandler" name="/admin/ping">
    <lst name="invariants">
      <str name="qt">search</str>
      <str name="q">solrpingquery</str>
    </lst>
    <lst name="defaults">
      <str name="echoParams">all</str>
    </lst>
  </requestHandler>
  <requestHandler class="solr.DumpRequestHandler" name="/debug/dump">
    <lst name="defaults">
      <str name="echoParams">explicit</str>
      <str name="echoHandler">true</str>
    </lst>
  </requestHandler>
  <admin>
    <defaultQuery>*:*</defaultQuery>
  </admin>
</config>
You can also view pending search index config or schema before it is active. For example, to view the pending index schema for demo.health_data:
DESCRIBE PENDING SEARCH INDEX SCHEMA ON demo.health_data;
<?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="diagnosed_thyroid_disease" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="pets" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="secondary_smoke" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_lupus" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="gender" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="birthplace" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="income_group" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="marital_status" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="age_months" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="bird" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="hay_fever" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_hay_fever" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="routine_medical_coverage" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="annual_income_20000" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="exam_status" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="other_pet" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_stroke" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="employer_paid_plan" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="family_sequence" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="diagnosed_cataracts" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="major_medical_coverage" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_gout" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="age_unit" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="goiter" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="chronic_bronchitis" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="county" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="num_smokers" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="screening_month" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_emphysema" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_other_cancer" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="id" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="dental_coverage" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="health_status" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="monthly_income_total" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="fish" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="dog" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="asthma" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="ethnicity" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="age" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="diagnosed_asthma" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="race_ethnicity" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_congestive_heart_failure" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="family_size" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="race" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="thyroid_disease" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="bronchitis" stored="true" type="TextField"/>
    <field docValues="true" indexed="true" multiValued="false" name="household_size" stored="true" type="TrieIntField"/>
    <field indexed="true" multiValued="false" name="cat" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_goiter" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="diagnosed_skin_cancer" stored="true" type="TextField"/>
    <field indexed="true" multiValued="false" name="fips" stored="true" type="TextField"/>
  </fields>
  <uniqueKey>(id,age)</uniqueKey>
</schema>