You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bruno Mannina <bm...@free.fr> on 2012/05/14 15:23:09 UTC
Date format in the schema.xml
Dear,
is it mandatory to use the date format yyyy-mm-ddThh:mm:ssZ ?
I have a date with this format:
yyyymmdd
in my xml source file.
Where can I find more information, I found only these definitions in the
schema.xml
<fieldType name="date" class="solr.TrieDateField" precisionStep="0"
positionIncrementGap="0"/>
<fieldType name="tdate" class="solr.TrieDateField" precisionStep="6"
positionIncrementGap="0"/>
Could you explain me the PrecisionStep param also?
Thanks and sorry for this newbie question,
Bruno
Re: Date format in the schema.xml
Posted by Chris Hostetter <ho...@fucit.org>.
: Subject: Date format in the schema.xml
: References: <13...@web121705.mail.ne1.yahoo.com>
: In-Reply-To: <13...@web121705.mail.ne1.yahoo.com>
https://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists
When starting a new discussion on a mailing list, please do not reply to
an existing message, instead start a fresh email. Even if you change the
subject line of your email, other mail headers still track which thread
you replied to and your question is "hidden" in that thread and gets less
attention. It makes following discussions in the mailing list archives
particularly difficult.
-Hoss
Re: Date format in the schema.xml
Posted by Bruno Mannina <bm...@free.fr>.
Ok Thanks !
Le 14/05/2012 16:16, Ahmet Arslan a écrit :
>> is it mandatory to use the date format yyyy-mm-ddThh:mm:ssZ
>> ?
> Yes.
>
>> I have a date with this format:
>> yyyymmdd
>> in my xml source file.
>>
>> Where can I find more information, I found only these
>> definitions in the schema.xml
> In schema.xml there is a xml comment about dates, starting with
> <!-- The format for this date field is of the form 1995-12-31T23:59:59Z,
>
>
>> Could you explain me the PrecisionStep param also?
> This presentation explains trie based fields.
> http://www.thetaphi.de/share/Schindler-TrieRange.ppt
>
>
>
>
>
Re: Date format in the schema.xml
Posted by Jack Krupansky <ja...@basetechnology.com>.
At least in this case where dates have a precision of day, the total number
of unique values should be relatively low (3,650 for a 10-year period or
even 18,250 for a 50-year period), so precision step probably won't matter
in this case much at all. The big benefit with tdate over old date here is
the fact that the string is stored as a long integer, which speeds
comparisons.
A precisionStep of zero ("0") means use the maximum value
(Integer.MAX_VALUE). The default (in trunk; not sure about 3.6 or earlier)
is "8", not 4 as the Javadoc indicates. Zero or high step values means more
precision, less index space consumed, but slower searching. Lower step
values, such as 8 or 4 or even 1, mean less precision, more index space
consumed, but faster searching.
I'm still struggling to figure out how to map values of precisionStep to
"precision" of the input data. For example, seconds, minutes, hours, days,
years for date values.
I'm also not sure what the implications, if any, are for faceting and the
FieldCache for Trie precision step.
Here's more detail:
http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/search/NumericRangeQuery.html
-- Jack Krupansky
-----Original Message-----
From: Ahmet Arslan
Sent: Monday, May 14, 2012 10:16 AM
To: solr-user@lucene.apache.org
Subject: Re: Date format in the schema.xml
> is it mandatory to use the date format yyyy-mm-ddThh:mm:ssZ
> ?
Yes.
> I have a date with this format:
> yyyymmdd
> in my xml source file.
>
> Where can I find more information, I found only these
> definitions in the schema.xml
In schema.xml there is a xml comment about dates, starting with
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z,
> Could you explain me the PrecisionStep param also?
This presentation explains trie based fields.
http://www.thetaphi.de/share/Schindler-TrieRange.ppt
Re: Date format in the schema.xml
Posted by Ahmet Arslan <io...@yahoo.com>.
> is it mandatory to use the date format yyyy-mm-ddThh:mm:ssZ
> ?
Yes.
> I have a date with this format:
> yyyymmdd
> in my xml source file.
>
> Where can I find more information, I found only these
> definitions in the schema.xml
In schema.xml there is a xml comment about dates, starting with
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z,
> Could you explain me the PrecisionStep param also?
This presentation explains trie based fields.
http://www.thetaphi.de/share/Schindler-TrieRange.ppt