lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Benedetti <abenede...@apache.org>
Subject Re: How to use TZ parameter in a query
Date Wed, 06 Apr 2016 10:43:51 GMT
At the moment, the tz parameter will be used to calculate the UTC date in
the query, based on the tz supplied.
In the index the dates are in UTC.
To show the dates in the same timezone we query, we should implement a
DocTransformer[1] .
This DocTransformer will check for all ( or a subset) of date field, and
render them in the input time-zone .
Would be a really nice addition, I encourage people to contribute it, can
be really nice completion for the tz parameter :)
https://issues.apache.org/jira/browse/SOLR-8952

Will do myself in the next month, it is pretty simple change, but everyone
is encouraged to contribute it :)

[1]
https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents

On Wed, Apr 6, 2016 at 10:57 AM, Bogdan Marinescu <
bogdan.marinescu@awinta.com> wrote:

> I understand. Would be nice though :)
>
> Thanks.
>
>
> On 04/06/2016 11:26 AM, jimi.hullegard@svensktnaringsliv.se wrote:
>
>> I think that this parameter is only used to interpret the dates provided
>> in the query, like query filters. At least that is how I interpret the wiki
>> text. Your interpretation makes more sense in general though, it would be
>> nice if it was possible to modify the timezone for both the query and the
>> result.
>>
>> /Jimi
>>
>> -----Original Message-----
>> From: Bogdan Marinescu [mailto:bogdan.marinescu@awinta.com]
>> Sent: Wednesday, April 6, 2016 11:20 AM
>> To: solr-user@lucene.apache.org
>> Subject: How to use TZ parameter in a query
>>
>> Hi,
>>
>> According to the wiki
>> https://wiki.apache.org/solr/CoreQueryParameters#TZ I can use the TZ
>> param to specify the timezone.
>> I tried to make a query and put in the raw section TZ=Europe/Berlin or
>> any other found in
>> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones but no
>> luck. The date that I get back is still in UTC format.
>>
>> Any ideas what I'm doing wrong?
>>
>> Thanks
>>
>
>


-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message