You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by Cihad Guzel <cg...@gmail.com> on 2016/11/20 16:08:24 UTC

Invalid date format for modified_date

Hi,

I use SharedDrive and Solr connector. I run my job and I have seen invalid
date format in modified_date field in my Solr index.  Otherwise the size
metadata is mising in solr index. The invalid metadata  as
follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"

"102400" is unnecessary value and it should not be added in modified_date.
I found the problem and edited it. I will create a pull request on github.

-- 
Kind Regards
Cihad Güzel

Re: Invalid date format for modified_date

Posted by Cihad Guzel <cg...@gmail.com>.
Thanks Karl.

--
Kind Regards
Cihad Güzel

2016-11-20 19:51 GMT+03:00 Karl Wright <da...@gmail.com>:

> I just committed the fix.
>
> Thanks!
> Karl
>
>
> On Sun, Nov 20, 2016 at 11:47 AM, Furkan KAMACI <fu...@gmail.com>
> wrote:
>
>> Hi Karl,
>>
>> I verify that modified date is not being sent as a valid ISO date. It has
>> such numbers prepended to it.
>>
>> Kind Regards,
>> Furkan KAMACI
>>
>> On Sun, Nov 20, 2016 at 6:32 PM, Cihad Guzel <cg...@gmail.com> wrote:
>>
>>> Hi Karl,
>>>
>>> I have created a pull request on github. You can see the problem from
>>> here: https://github.com/apache/manifoldcf/pull/10/commits/6
>>> a71a44ead5507c00302cb3a0a6a96d2bd2a02ce
>>>
>>> 2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:
>>>
>>>> The code for formatting a date is here:
>>>>
>>>> >>>>>>
>>>>   public static String formatISO8601Date(Date dateValue)
>>>>   {
>>>>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
>>>> Locale.ROOT);
>>>>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>>>>     return df.format(dateValue);
>>>>   }
>>>>
>>>> <<<<<<
>>>>
>>>> The code that fills in the modified_date attribute in the Solr
>>>> connector is here:
>>>>
>>>> >>>>>>
>>>>       if ( modifiedDateAttributeName != null )
>>>>       {
>>>>         Date date = document.getModifiedDate();
>>>>         if ( date != null )
>>>>         {
>>>>           outputDoc.addField( modifiedDateAttributeName,
>>>> DateParser.formatISO8601Date( date ) );
>>>>         }
>>>>       }
>>>> <<<<<<
>>>>
>>>> I can't see any way that a number could be prepended to this.
>>>>
>>>> Karl
>>>>
>>>>
>>>> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I use SharedDrive and Solr connector. I run my job and I have seen
>>>>> invalid date format in modified_date field in my Solr index.  Otherwise the
>>>>> size metadata is mising in solr index. The invalid metadata  as
>>>>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>>>>
>>>>> "102400" is unnecessary value and it should not be added in
>>>>> modified_date. I found the problem and edited it. I will create a pull
>>>>> request on github.
>>>>>
>>>>> --
>>>>> Kind Regards
>>>>> Cihad Güzel
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Teşekkürler
>>> Cihad Güzel
>>>
>>
>>
>


-- 
Teşekkürler
Cihad Güzel

Re: Invalid date format for modified_date

Posted by Cihad Guzel <cg...@gmail.com>.
Thanks Karl.

--
Kind Regards
Cihad Güzel

2016-11-20 19:51 GMT+03:00 Karl Wright <da...@gmail.com>:

> I just committed the fix.
>
> Thanks!
> Karl
>
>
> On Sun, Nov 20, 2016 at 11:47 AM, Furkan KAMACI <fu...@gmail.com>
> wrote:
>
>> Hi Karl,
>>
>> I verify that modified date is not being sent as a valid ISO date. It has
>> such numbers prepended to it.
>>
>> Kind Regards,
>> Furkan KAMACI
>>
>> On Sun, Nov 20, 2016 at 6:32 PM, Cihad Guzel <cg...@gmail.com> wrote:
>>
>>> Hi Karl,
>>>
>>> I have created a pull request on github. You can see the problem from
>>> here: https://github.com/apache/manifoldcf/pull/10/commits/6
>>> a71a44ead5507c00302cb3a0a6a96d2bd2a02ce
>>>
>>> 2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:
>>>
>>>> The code for formatting a date is here:
>>>>
>>>> >>>>>>
>>>>   public static String formatISO8601Date(Date dateValue)
>>>>   {
>>>>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
>>>> Locale.ROOT);
>>>>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>>>>     return df.format(dateValue);
>>>>   }
>>>>
>>>> <<<<<<
>>>>
>>>> The code that fills in the modified_date attribute in the Solr
>>>> connector is here:
>>>>
>>>> >>>>>>
>>>>       if ( modifiedDateAttributeName != null )
>>>>       {
>>>>         Date date = document.getModifiedDate();
>>>>         if ( date != null )
>>>>         {
>>>>           outputDoc.addField( modifiedDateAttributeName,
>>>> DateParser.formatISO8601Date( date ) );
>>>>         }
>>>>       }
>>>> <<<<<<
>>>>
>>>> I can't see any way that a number could be prepended to this.
>>>>
>>>> Karl
>>>>
>>>>
>>>> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I use SharedDrive and Solr connector. I run my job and I have seen
>>>>> invalid date format in modified_date field in my Solr index.  Otherwise the
>>>>> size metadata is mising in solr index. The invalid metadata  as
>>>>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>>>>
>>>>> "102400" is unnecessary value and it should not be added in
>>>>> modified_date. I found the problem and edited it. I will create a pull
>>>>> request on github.
>>>>>
>>>>> --
>>>>> Kind Regards
>>>>> Cihad Güzel
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Teşekkürler
>>> Cihad Güzel
>>>
>>
>>
>


-- 
Teşekkürler
Cihad Güzel

Re: Invalid date format for modified_date

Posted by Karl Wright <da...@gmail.com>.
I just committed the fix.

Thanks!
Karl


On Sun, Nov 20, 2016 at 11:47 AM, Furkan KAMACI <fu...@gmail.com>
wrote:

> Hi Karl,
>
> I verify that modified date is not being sent as a valid ISO date. It has
> such numbers prepended to it.
>
> Kind Regards,
> Furkan KAMACI
>
> On Sun, Nov 20, 2016 at 6:32 PM, Cihad Guzel <cg...@gmail.com> wrote:
>
>> Hi Karl,
>>
>> I have created a pull request on github. You can see the problem from
>> here: https://github.com/apache/manifoldcf/pull/10/commits/6
>> a71a44ead5507c00302cb3a0a6a96d2bd2a02ce
>>
>> 2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:
>>
>>> The code for formatting a date is here:
>>>
>>> >>>>>>
>>>   public static String formatISO8601Date(Date dateValue)
>>>   {
>>>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
>>> Locale.ROOT);
>>>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>>>     return df.format(dateValue);
>>>   }
>>>
>>> <<<<<<
>>>
>>> The code that fills in the modified_date attribute in the Solr connector
>>> is here:
>>>
>>> >>>>>>
>>>       if ( modifiedDateAttributeName != null )
>>>       {
>>>         Date date = document.getModifiedDate();
>>>         if ( date != null )
>>>         {
>>>           outputDoc.addField( modifiedDateAttributeName,
>>> DateParser.formatISO8601Date( date ) );
>>>         }
>>>       }
>>> <<<<<<
>>>
>>> I can't see any way that a number could be prepended to this.
>>>
>>> Karl
>>>
>>>
>>> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I use SharedDrive and Solr connector. I run my job and I have seen
>>>> invalid date format in modified_date field in my Solr index.  Otherwise the
>>>> size metadata is mising in solr index. The invalid metadata  as
>>>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>>>
>>>> "102400" is unnecessary value and it should not be added in
>>>> modified_date. I found the problem and edited it. I will create a pull
>>>> request on github.
>>>>
>>>> --
>>>> Kind Regards
>>>> Cihad Güzel
>>>>
>>>
>>>
>>
>>
>> --
>> Teşekkürler
>> Cihad Güzel
>>
>
>

Re: Invalid date format for modified_date

Posted by Karl Wright <da...@gmail.com>.
I just committed the fix.

Thanks!
Karl


On Sun, Nov 20, 2016 at 11:47 AM, Furkan KAMACI <fu...@gmail.com>
wrote:

> Hi Karl,
>
> I verify that modified date is not being sent as a valid ISO date. It has
> such numbers prepended to it.
>
> Kind Regards,
> Furkan KAMACI
>
> On Sun, Nov 20, 2016 at 6:32 PM, Cihad Guzel <cg...@gmail.com> wrote:
>
>> Hi Karl,
>>
>> I have created a pull request on github. You can see the problem from
>> here: https://github.com/apache/manifoldcf/pull/10/commits/6
>> a71a44ead5507c00302cb3a0a6a96d2bd2a02ce
>>
>> 2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:
>>
>>> The code for formatting a date is here:
>>>
>>> >>>>>>
>>>   public static String formatISO8601Date(Date dateValue)
>>>   {
>>>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
>>> Locale.ROOT);
>>>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>>>     return df.format(dateValue);
>>>   }
>>>
>>> <<<<<<
>>>
>>> The code that fills in the modified_date attribute in the Solr connector
>>> is here:
>>>
>>> >>>>>>
>>>       if ( modifiedDateAttributeName != null )
>>>       {
>>>         Date date = document.getModifiedDate();
>>>         if ( date != null )
>>>         {
>>>           outputDoc.addField( modifiedDateAttributeName,
>>> DateParser.formatISO8601Date( date ) );
>>>         }
>>>       }
>>> <<<<<<
>>>
>>> I can't see any way that a number could be prepended to this.
>>>
>>> Karl
>>>
>>>
>>> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I use SharedDrive and Solr connector. I run my job and I have seen
>>>> invalid date format in modified_date field in my Solr index.  Otherwise the
>>>> size metadata is mising in solr index. The invalid metadata  as
>>>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>>>
>>>> "102400" is unnecessary value and it should not be added in
>>>> modified_date. I found the problem and edited it. I will create a pull
>>>> request on github.
>>>>
>>>> --
>>>> Kind Regards
>>>> Cihad Güzel
>>>>
>>>
>>>
>>
>>
>> --
>> Teşekkürler
>> Cihad Güzel
>>
>
>

Re: Invalid date format for modified_date

Posted by Furkan KAMACI <fu...@gmail.com>.
Hi Karl,

I verify that modified date is not being sent as a valid ISO date. It has
such numbers prepended to it.

Kind Regards,
Furkan KAMACI

On Sun, Nov 20, 2016 at 6:32 PM, Cihad Guzel <cg...@gmail.com> wrote:

> Hi Karl,
>
> I have created a pull request on github. You can see the problem from
> here: https://github.com/apache/manifoldcf/pull/10/commits/
> 6a71a44ead5507c00302cb3a0a6a96d2bd2a02ce
>
> 2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:
>
>> The code for formatting a date is here:
>>
>> >>>>>>
>>   public static String formatISO8601Date(Date dateValue)
>>   {
>>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
>> Locale.ROOT);
>>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>>     return df.format(dateValue);
>>   }
>>
>> <<<<<<
>>
>> The code that fills in the modified_date attribute in the Solr connector
>> is here:
>>
>> >>>>>>
>>       if ( modifiedDateAttributeName != null )
>>       {
>>         Date date = document.getModifiedDate();
>>         if ( date != null )
>>         {
>>           outputDoc.addField( modifiedDateAttributeName,
>> DateParser.formatISO8601Date( date ) );
>>         }
>>       }
>> <<<<<<
>>
>> I can't see any way that a number could be prepended to this.
>>
>> Karl
>>
>>
>> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I use SharedDrive and Solr connector. I run my job and I have seen
>>> invalid date format in modified_date field in my Solr index.  Otherwise the
>>> size metadata is mising in solr index. The invalid metadata  as
>>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>>
>>> "102400" is unnecessary value and it should not be added in
>>> modified_date. I found the problem and edited it. I will create a pull
>>> request on github.
>>>
>>> --
>>> Kind Regards
>>> Cihad Güzel
>>>
>>
>>
>
>
> --
> Teşekkürler
> Cihad Güzel
>

Re: Invalid date format for modified_date

Posted by Furkan KAMACI <fu...@gmail.com>.
Hi Karl,

I verify that modified date is not being sent as a valid ISO date. It has
such numbers prepended to it.

Kind Regards,
Furkan KAMACI

On Sun, Nov 20, 2016 at 6:32 PM, Cihad Guzel <cg...@gmail.com> wrote:

> Hi Karl,
>
> I have created a pull request on github. You can see the problem from
> here: https://github.com/apache/manifoldcf/pull/10/commits/
> 6a71a44ead5507c00302cb3a0a6a96d2bd2a02ce
>
> 2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:
>
>> The code for formatting a date is here:
>>
>> >>>>>>
>>   public static String formatISO8601Date(Date dateValue)
>>   {
>>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
>> Locale.ROOT);
>>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>>     return df.format(dateValue);
>>   }
>>
>> <<<<<<
>>
>> The code that fills in the modified_date attribute in the Solr connector
>> is here:
>>
>> >>>>>>
>>       if ( modifiedDateAttributeName != null )
>>       {
>>         Date date = document.getModifiedDate();
>>         if ( date != null )
>>         {
>>           outputDoc.addField( modifiedDateAttributeName,
>> DateParser.formatISO8601Date( date ) );
>>         }
>>       }
>> <<<<<<
>>
>> I can't see any way that a number could be prepended to this.
>>
>> Karl
>>
>>
>> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I use SharedDrive and Solr connector. I run my job and I have seen
>>> invalid date format in modified_date field in my Solr index.  Otherwise the
>>> size metadata is mising in solr index. The invalid metadata  as
>>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>>
>>> "102400" is unnecessary value and it should not be added in
>>> modified_date. I found the problem and edited it. I will create a pull
>>> request on github.
>>>
>>> --
>>> Kind Regards
>>> Cihad Güzel
>>>
>>
>>
>
>
> --
> Teşekkürler
> Cihad Güzel
>

Re: Invalid date format for modified_date

Posted by Cihad Guzel <cg...@gmail.com>.
Hi Karl,

I have created a pull request on github. You can see the problem from here:
https://github.com/apache/manifoldcf/pull/10/commits/6a71a44ead5507c00302cb3a0a6a96d2bd2a02ce

2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:

> The code for formatting a date is here:
>
> >>>>>>
>   public static String formatISO8601Date(Date dateValue)
>   {
>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
> Locale.ROOT);
>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>     return df.format(dateValue);
>   }
>
> <<<<<<
>
> The code that fills in the modified_date attribute in the Solr connector
> is here:
>
> >>>>>>
>       if ( modifiedDateAttributeName != null )
>       {
>         Date date = document.getModifiedDate();
>         if ( date != null )
>         {
>           outputDoc.addField( modifiedDateAttributeName,
> DateParser.formatISO8601Date( date ) );
>         }
>       }
> <<<<<<
>
> I can't see any way that a number could be prepended to this.
>
> Karl
>
>
> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:
>
>> Hi,
>>
>> I use SharedDrive and Solr connector. I run my job and I have seen
>> invalid date format in modified_date field in my Solr index.  Otherwise the
>> size metadata is mising in solr index. The invalid metadata  as
>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>
>> "102400" is unnecessary value and it should not be added in
>> modified_date. I found the problem and edited it. I will create a pull
>> request on github.
>>
>> --
>> Kind Regards
>> Cihad Güzel
>>
>
>


-- 
Teşekkürler
Cihad Güzel

Re: Invalid date format for modified_date

Posted by Cihad Guzel <cg...@gmail.com>.
Hi Karl,

I have created a pull request on github. You can see the problem from here:
https://github.com/apache/manifoldcf/pull/10/commits/6a71a44ead5507c00302cb3a0a6a96d2bd2a02ce

2016-11-20 19:25 GMT+03:00 Karl Wright <da...@gmail.com>:

> The code for formatting a date is here:
>
> >>>>>>
>   public static String formatISO8601Date(Date dateValue)
>   {
>     java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",
> Locale.ROOT);
>     df.setTimeZone(TimeZone.getTimeZone("GMT"));
>     return df.format(dateValue);
>   }
>
> <<<<<<
>
> The code that fills in the modified_date attribute in the Solr connector
> is here:
>
> >>>>>>
>       if ( modifiedDateAttributeName != null )
>       {
>         Date date = document.getModifiedDate();
>         if ( date != null )
>         {
>           outputDoc.addField( modifiedDateAttributeName,
> DateParser.formatISO8601Date( date ) );
>         }
>       }
> <<<<<<
>
> I can't see any way that a number could be prepended to this.
>
> Karl
>
>
> On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:
>
>> Hi,
>>
>> I use SharedDrive and Solr connector. I run my job and I have seen
>> invalid date format in modified_date field in my Solr index.  Otherwise the
>> size metadata is mising in solr index. The invalid metadata  as
>> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>>
>> "102400" is unnecessary value and it should not be added in
>> modified_date. I found the problem and edited it. I will create a pull
>> request on github.
>>
>> --
>> Kind Regards
>> Cihad Güzel
>>
>
>


-- 
Teşekkürler
Cihad Güzel

Re: Invalid date format for modified_date

Posted by Karl Wright <da...@gmail.com>.
The code for formatting a date is here:

>>>>>>
  public static String formatISO8601Date(Date dateValue)
  {
    java.text.DateFormat df = new
java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ROOT);
    df.setTimeZone(TimeZone.getTimeZone("GMT"));
    return df.format(dateValue);
  }

<<<<<<

The code that fills in the modified_date attribute in the Solr connector is
here:

>>>>>>
      if ( modifiedDateAttributeName != null )
      {
        Date date = document.getModifiedDate();
        if ( date != null )
        {
          outputDoc.addField( modifiedDateAttributeName,
DateParser.formatISO8601Date( date ) );
        }
      }
<<<<<<

I can't see any way that a number could be prepended to this.

Karl


On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:

> Hi,
>
> I use SharedDrive and Solr connector. I run my job and I have seen invalid
> date format in modified_date field in my Solr index.  Otherwise the size
> metadata is mising in solr index. The invalid metadata  as
> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>
> "102400" is unnecessary value and it should not be added in modified_date.
> I found the problem and edited it. I will create a pull request on github.
>
> --
> Kind Regards
> Cihad Güzel
>

Re: Invalid date format for modified_date

Posted by Karl Wright <da...@gmail.com>.
The code for formatting a date is here:

>>>>>>
  public static String formatISO8601Date(Date dateValue)
  {
    java.text.DateFormat df = new
java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ROOT);
    df.setTimeZone(TimeZone.getTimeZone("GMT"));
    return df.format(dateValue);
  }

<<<<<<

The code that fills in the modified_date attribute in the Solr connector is
here:

>>>>>>
      if ( modifiedDateAttributeName != null )
      {
        Date date = document.getModifiedDate();
        if ( date != null )
        {
          outputDoc.addField( modifiedDateAttributeName,
DateParser.formatISO8601Date( date ) );
        }
      }
<<<<<<

I can't see any way that a number could be prepended to this.

Karl


On Sun, Nov 20, 2016 at 11:08 AM, Cihad Guzel <cg...@gmail.com> wrote:

> Hi,
>
> I use SharedDrive and Solr connector. I run my job and I have seen invalid
> date format in modified_date field in my Solr index.  Otherwise the size
> metadata is mising in solr index. The invalid metadata  as
> follow: "modified_date": "102400 2016-11-17T13:21:22.163Z"
>
> "102400" is unnecessary value and it should not be added in modified_date.
> I found the problem and edited it. I will create a pull request on github.
>
> --
> Kind Regards
> Cihad Güzel
>