lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrique O. Santos" <hensan...@gmail.com>
Subject Re: Can TrieDateField fields be null?
Date Sun, 23 Aug 2015 14:29:49 GMT
Hello again,

I am doing some manual indexing using Solr Admin UI to be exactly sure 
how TrieDateFields and null values work. When I remove the TrieDateField 
from the document, I get the following when trying to index it:

|     "msg": "Invalid Date String:'NULL'",
     "code": 400|


On Solr 5.2.1. Can I assume that TrieDateFields need to be specified for 
every document?

Thanks.

On 08/23/2015 09:48 AM, Henrique O. Santos wrote:
> Hi Erick and Upayavira, thanks for the reply.
>
> I am using Solr 5.2.1 and using SolrJ 5.2.1 API with an annotated POJO 
> to update the index. And you were right, somehow my JODA DateTime 
> field was being filled with the current timestamp prior to the update.
>
> Thanks for the clarification again.
>
> On 08/22/2015 09:55 PM, Erick Erickson wrote:
>> TrieDateFields can be null. Actually, just not in the document.
>> I just verified with 4.10....
>>
>> How are you indexing? I suspect that somehow the program that's sending
>> things to Solr is putting the default time in.
>>
>> What version of Solr?
>>
>> Best,
>> Erick
>>
>> On Sat, Aug 22, 2015 at 4:04 PM, Henrique O. Santos 
>> <hensantos@gmail.com> wrote:
>>> Hello,
>>>
>>> Just a simple question. Can TrieDateField fields be null? I have a 
>>> schema
>>> with the following field and type:
>>>      <field name="started_at" type="date" indexed="true" stored="true"
>>> docValues="true" />
>>>      <fieldType name="date" class="solr.TrieDateField" 
>>> precisionStep="0"
>>> positionIncrementGap="0"/>
>>>
>>> Every time I index a document with no value for this field, the 
>>> current time
>>> gets indexed and stored. Is there anyway to make this field null?
>>>
>>> My use case for this collection requires that I check if that date 
>>> field is
>>> already filled or not.
>>>
>>> Thank you,
>>> Henrique.
>


Mime
View raw message