Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Solr Collection is not accepting Date datatype

Solved Go to solution
Highlighted

Solr Collection is not accepting Date datatype

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

Accepted Solutions
Highlighted

Re: Solr Collection is not accepting Date datatype

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
Highlighted

Re: Solr Collection is not accepting Date datatype

Explorer

Hi friends,

 

Any idea or update about this solr issue.

 

Brgds,

GTA

Highlighted

Re: Solr Collection is not accepting Date datatype

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

Don't have an account?
Coming from Hortonworks? Activate your account here