Re: Solr - Error when trying to index the date field.

2016-06-14 Thread Erick Erickson
BTW, the easiest way to check what schema
file you are _actually_ using is through the
admin UI. Select a core, go to files>>and click
on the schema file in question

Best,
Erick

On Tue, Jun 14, 2016 at 5:53 AM, Shawn Heisey  wrote:
> On 6/14/2016 6:09 AM, Syedabbasmehdi Rizvi wrote:
>> Schema file has a field called timestamp of type date. Still it shows
>> that error.
>
> Did you restart Solr or reload the core/collection after modifying the
> schema?
>
> Are you absolutely sure that you are looking at the active schema file?
> Users are often confused about which file is the correct one.
>
> The active schema file will be named either managed-schema or
> schema.xml, depending on how solrconfig.xml is configured.  The examples
> in 5.5 and later use managed-schema exclusively.  Before 5.5, it might
> be either one, depending on which configset you used.
>
> If you're in SolrCloud mode, the active schema will live in zookeeper,
> in the configuration linked to the collection.  If you're not in cloud
> mode, look for a "conf" directory inside the Instance directory that you
> can see on the core overview page in the admin UI.  That is where the
> schema will live.
>
> Thanks,
> Shawn
>


Re: Solr - Error when trying to index the date field.

2016-06-14 Thread Shawn Heisey
On 6/14/2016 6:09 AM, Syedabbasmehdi Rizvi wrote:
> Schema file has a field called timestamp of type date. Still it shows
> that error. 

Did you restart Solr or reload the core/collection after modifying the
schema?

Are you absolutely sure that you are looking at the active schema file? 
Users are often confused about which file is the correct one.

The active schema file will be named either managed-schema or
schema.xml, depending on how solrconfig.xml is configured.  The examples
in 5.5 and later use managed-schema exclusively.  Before 5.5, it might
be either one, depending on which configset you used.

If you're in SolrCloud mode, the active schema will live in zookeeper,
in the configuration linked to the collection.  If you're not in cloud
mode, look for a "conf" directory inside the Instance directory that you
can see on the core overview page in the admin UI.  That is where the
schema will live.

Thanks,
Shawn



RE: Solr - Error when trying to index the date field.

2016-06-14 Thread Syedabbasmehdi Rizvi
Schema file has a field called timestamp of type date. Still it shows that 
error.



-Original Message-
From: Erik Hatcher [mailto:erik.hatc...@gmail.com] 
Sent: Tuesday, June 14, 2016 5:31 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr - Error when trying to index the date field.

You apparently don’t have a `timestamp` field defined in your schema.  The 
error message is:

 unknown field ‘timestamp’





> On Jun 14, 2016, at 5:18 AM, Syedabbasmehdi Rizvi  
> wrote:
> 
> Hi,
> 
> I am trying to index a CSV file that contains a date field. I have the 
> date field configured in schema and config.xml But somehow, it shows an error 
> when I try to index this file which says:
> 
> SimplePostTool version 5.0.0
> Posting files to [base] url http://localhost:8983/solr/polycom/update using 
> content-type text/csv...
> POSTing file book1.csv to [base]
> SimplePostTool: WARNING: Solr returned an error #400 (Bad Request) for 
> url: http ://localhost:8983/solr/polycom/update
> SimplePostTool: WARNING: Response:  encoding="UTF-8"?>   name="status">4002  name="error">org.apache.
> solr.common.SolrException name="root-error-class">org.apache.solr.comm
> on.SolrExceptionERROR: [doc=552998] 
> unknown field 't imestamp'400 
> 
> SimplePostTool: WARNING: IOException while reading response: 
> java.io.IOException
> : Server returned HTTP response code: 400 for URL: 
> http://localhost:8983/solr/po lycom/update
> 
> A help would really be very useful. Kindly share the steps to do so if 
> possible.
> 
> Regards
> Abbas
> 
> 
> ::DISCLAIMER::
> --
> --
> 
> 
> The contents of this e-mail and any attachment(s) are confidential and 
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as 
> information could be intercepted, corrupted, lost, destroyed, arrive 
> late or incomplete, or may contain viruses in transmission. The e mail and 
> its contents (with or without referred errors) shall therefore not attach any 
> liability on the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of 
> the author and may not necessarily reflect the views or opinions of 
> HCL or its affiliates. Any form of reproduction, dissemination, 
> copying, disclosure, modification, distribution and / or publication of this 
> message without the prior written consent of authorized representative of HCL 
> is strictly prohibited. If you have received this email in error please 
> delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for viruses 
> and other defects.
> 
> --
> --
> 



Re: Solr - Error when trying to index the date field.

2016-06-14 Thread Erik Hatcher
You apparently don’t have a `timestamp` field defined in your schema.  The 
error message is:

 unknown field ‘timestamp’





> On Jun 14, 2016, at 5:18 AM, Syedabbasmehdi Rizvi  
> wrote:
> 
> Hi,
> 
> I am trying to index a CSV file that contains a date field. I have the date 
> field configured in schema and config.xml
> But somehow, it shows an error when I try to index this file which says:
> 
> SimplePostTool version 5.0.0
> Posting files to [base] url http://localhost:8983/solr/polycom/update using 
> content-type text/csv...
> POSTing file book1.csv to [base]
> SimplePostTool: WARNING: Solr returned an error #400 (Bad Request) for url: 
> http
> ://localhost:8983/solr/polycom/update
> SimplePostTool: WARNING: Response: 
> 
> 400 name="QTime">2
>  name="error-class">org.apache.
> solr.common.SolrException name="root-error-class">org.apache.solr.comm
> on.SolrExceptionERROR: [doc=552998] unknown field 
> 't
> imestamp'400
> 
> SimplePostTool: WARNING: IOException while reading response: 
> java.io.IOException
> : Server returned HTTP response code: 400 for URL: 
> http://localhost:8983/solr/po
> lycom/update
> 
> A help would really be very useful. Kindly share the steps to do so if 
> possible.
> 
> Regards
> Abbas
> 
> 
> ::DISCLAIMER::
> 
> 
> The contents of this e-mail and any attachment(s) are confidential and 
> intended for the named recipient(s) only.
> E-mail transmission is not guaranteed to be secure or error-free as 
> information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or may contain viruses in 
> transmission. The e mail and its contents
> (with or without referred errors) shall therefore not attach any liability on 
> the originator or HCL or its affiliates.
> Views or opinions, if any, presented in this email are solely those of the 
> author and may not necessarily reflect the
> views or opinions of HCL or its affiliates. Any form of reproduction, 
> dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior written 
> consent of authorized representative of
> HCL is strictly prohibited. If you have received this email in error please 
> delete it and notify the sender immediately.
> Before opening any email and/or attachments, please check them for viruses 
> and other defects.
> 
>