Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Solr Collection is not accepting Date datatype

avatar
Explorer

Hi friends,

 

After adding my field tags in the schema.xml file like below

 

<field name="_version_" type="plong" indexed="true" stored="true" multiValued="false" />
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="ip" type="text_general" indexed="true" stored="true"/>
<field name="request_date" type="date" indexed="true" stored="true"/>
<field name="request" type="text_general" indexed="true" stored="true"/>
<field name="department" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="category" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="product" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="action" type="string" indexed="true" stored="true" multiValued="false"/>

 

And when i tried to create solr collection it is returning error like below

 

Unable to create core [live_logs15_shard1_replica_n1] Caused by: Unknown fieldType 'date' specified on field request_date"}}

 

It is not accepting date datatype that i specified. Suppose instead of date datatype if i specify string for the field request_date means, then i can create collection successfully, but the solr collection is not accepting date data type and not sure the reason besides this issue.

 

Thanks in advance.

 

Regards,

GTA

1 ACCEPTED SOLUTION

avatar
Explorer

Hi guys,

 

I found that, the reason for the solr to not accept my date Field is due to the missing date Field type allocation to the Field name: request date.in my schema.xml file.

 

After adding the below date field type, i could successfully create the solr collection

<fieldType name="date" class="solr.DateRangeField" ></fieldType>

 

Thanks,

 

Regards,

GTA

View solution in original post

2 REPLIES 2

avatar
Explorer

Hi friends,

 

Any idea or update about this solr issue.

 

Brgds,

GTA

avatar
Explorer

Hi guys,

 

I found that, the reason for the solr to not accept my date Field is due to the missing date Field type allocation to the Field name: request date.in my schema.xml file.

 

After adding the below date field type, i could successfully create the solr collection

<fieldType name="date" class="solr.DateRangeField" ></fieldType>

 

Thanks,

 

Regards,

GTA