Solr has an error with the specified unknown field type 'cndate'' when using DIH. How to modify the specification?

Unknown fieldType "cndate" specified on field birth. appears whenever I use type= "cndate"

when I comment on this line of code, the program can run. Not only "cndate", but also "int" and "text_ik" will report the same mistake.

related codes

Code of the schema.xml file

<field name="userName" type="string" indexed="true" stored="true" omitNorms="true"/>
<field name="sex" type="boolean" indexed="true" stored="true" omitNorms="true"/>
<field name="birth" type="cndate" indexed="true" stored="true" omitNorms="true"/>
<field name="salary" type="int" indexed="true" stored="true" omitNorms="true"/>
<field name="text" type="text_ik" indexed="true" stored="true" omitNorms="true" multiValued="false"/>
<field name="author" type="string" indexed="true" stored="true"/>
<field name="title" type="string" indexed="true" stored="true"/>
<field name="fileName" type="string" indexed="true" stored="true"/>
<field name="filePath" type="string" indexed="true" stored="true" required="true" multiValued="false"/>
<field name="size" type="long" indexed="true" stored="true" />
<field name="lastModified" type="cndate" indexed="true" stored="true"/>

<field name="id" type="string" indexed="true" stored="true" required="false" multiValued="false" />

what result do you expect? What is the error message actually seen?

error problem log: new2_core: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core new2_core: Can"t load schema cndate" specified on field birth cndate" specified on field birth

how do you specify these types in solr?

solr is version 7.5

Aug.04,2021

there may be no "cndata", "int" and "text_ik" types in the solr7.5 version. Check the source code to find

<dynamicField name="*_i"  type="pint"    indexed="true"  stored="true"/>
<dynamicField name="*_is" type="pints"    indexed="true"  stored="true"/>
<dynamicField name="*_s"  type="string"  indexed="true"  stored="true" />
<dynamicField name="*_ss" type="strings"  indexed="true"  stored="true"/>
<dynamicField name="*_l"  type="plong"   indexed="true"  stored="true"/>
<dynamicField name="*_ls" type="plongs"   indexed="true"  stored="true"/>
<dynamicField name="*_t" type="text_general" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="*_txt" type="text_general" indexed="true" stored="true"/>
<dynamicField name="*_b"  type="boolean" indexed="true" stored="true"/>
<dynamicField name="*_bs" type="booleans" indexed="true" stored="true"/>
<dynamicField name="*_f"  type="pfloat"  indexed="true"  stored="true"/>
<dynamicField name="*_fs" type="pfloats"  indexed="true"  stored="true"/>
<dynamicField name="*_d"  type="pdouble" indexed="true"  stored="true"/>
<dynamicField name="*_ds" type="pdoubles" indexed="true"  stored="true"/>
<dynamicField name="random_*" type="random"/>
<!-- Type used for data-driven schema, to add a string copy for each text field -->
<dynamicField name="*_str" type="strings" stored="false" docValues="true" indexed="false" useDocValuesAsStored="false"/>
<dynamicField name="*_dt"  type="pdate"    indexed="true"  stored="true"/>
<dynamicField name="*_dts" type="pdate"    indexed="true"  stored="true" multiValued="true"/>
<dynamicField name="*_p"  type="location" indexed="true" stored="true"/>
<dynamicField name="*_srpt"  type="location_rpt" indexed="true" stored="true"/>
<!-- payloaded dynamic fields -->
<dynamicField name="*_dpf" type="delimited_payloads_float" indexed="true"  stored="true"/>
<dynamicField name="*_dpi" type="delimited_payloads_int" indexed="true"  stored="true"/>
<dynamicField name="*_dps" type="delimited_payloads_string" indexed="true"  stored="true"/>
<dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>

represents different types of code. Change "cndata" to "pdata", "int" to "pint", and "text_ik" to "text_general" to run

Menu