Viewing search index schema and config
Search index schema and config are stored internally in the database. When you modify a search index schema or config, the changes are pending.
Use the RELOAD SEARCH INDEX command to apply the pending changes to the active (in use) search index.
DataStax recommends using CQL to view the pending or active (in use) schema or config. <section audience="helpexclude"
CQL shell DESCRIBE command
Use the CQL shell command DESCRIBE SEARCH INDEX to view the active and pending schema and config.
Show the active index config for wiki.solr:</p>
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>
<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>
Show the pending index config:
View the 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;
The results are shown in XML:
<?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" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_thyroid_disease" type="TextField"/>
<field indexed="true" multiValued="false" name="pets" type="TextField"/>
<field indexed="true" multiValued="false" name="secondary_smoke" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_lupus" type="TextField"/>
<field indexed="true" multiValued="false" name="gender" type="TextField"/>
<field indexed="true" multiValued="false" name="birthplace" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="income_group" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="marital_status" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="age_months" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="bird" type="TextField"/>
<field indexed="true" multiValued="false" name="hay_fever" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_hay_fever" type="TextField"/>
<field indexed="true" multiValued="false" name="routine_medical_coverage" type="TextField"/>
<field indexed="true" multiValued="false" name="annual_income_20000" type="TextField"/>
<field indexed="true" multiValued="false" name="exam_status" type="TextField"/>
<field indexed="true" multiValued="false" name="other_pet" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_stroke" type="TextField"/>
<field indexed="true" multiValued="false" name="employer_paid_plan" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="family_sequence" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="diagnosed_cataracts" type="TextField"/>
<field indexed="true" multiValued="false" name="major_medical_coverage" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_gout" type="TextField"/>
<field indexed="true" multiValued="false" name="age_unit" type="TextField"/>
<field indexed="true" multiValued="false" name="goiter" type="TextField"/>
<field indexed="true" multiValued="false" name="chronic_bronchitis" type="TextField"/>
<field indexed="true" multiValued="false" name="county" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="num_smokers" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="screening_month" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_emphysema" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_other_cancer" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="id" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="dental_coverage" type="TextField"/>
<field indexed="true" multiValued="false" name="health_status" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="monthly_income_total" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="fish" type="TextField"/>
<field indexed="true" multiValued="false" name="dog" type="TextField"/>
<field indexed="true" multiValued="false" name="asthma" type="TextField"/>
<field indexed="true" multiValued="false" name="ethnicity" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="age" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="diagnosed_asthma" type="TextField"/>
<field indexed="true" multiValued="false" name="race_ethnicity" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_congestive_heart_failure" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="family_size" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="race" type="TextField"/>
<field indexed="true" multiValued="false" name="thyroid_disease" type="TextField"/>
<field indexed="true" multiValued="false" name="bronchitis" type="TextField"/>
<field docValues="true" indexed="true" multiValued="false" name="household_size" type="TrieIntField"/>
<field indexed="true" multiValued="false" name="cat" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_goiter" type="TextField"/>
<field indexed="true" multiValued="false" name="diagnosed_skin_cancer" type="TextField"/>
<field indexed="true" multiValued="false" name="fips" type="TextField"/>
</fields>
<uniqueKey>(id,age)</uniqueKey>
</schema>
Alternate ways to view
Other ways to view the search index schema and config in XML:
-
dsetool
View the pending (uploaded) or active (in use) schema or config.
-
Solr Admin
View only the last uploaded (pending) resource.