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 Derek Poh <dp...@globalsources.com> on 2018/08/31 01:26:50 UTC
change DocExpirationUpdateProcessorFactory deleteByQuery NOW
parameter time zone
Hi
Can the timezone of the NOW parameter in the |deleteByQuery| of the
DocExpirationUpdateProcessorFactory be change to my timezone?
I am in SG and using solr 6.5.1.
The timestamp of the entries in the solr.log is in my timezone but the
NOW parameter of the |deleteByQuery| is a different timezone (UTC?).
The |deleteByQuery| entry in the solr.log:
2018-08-30 16:34:03.941 INFO (qtp834133664-3600) [c:exhibitor_product_2
s:shard1 r:core_node1 x:exhibitor_product_2_shard1_replica2]
o.a.s.u.p.LogUpdateProcessorFactory
[exhibitor_product_2_shard1_replica2] webapp=/solr path=/update
params={update.distrib=FROMLEADER&_version_=-1610212229046599680&distrib.from=http://192.168.83.152:8983/solr/exhibitor_product_2_shard1_replica1/&wt=javabin&version=2}{deleteByQuery={!cache=false}P_TradeShowOnlineEndDate:[*
TO 2018-08-30T08:34:06.804Z] (-1610212229046599680)} 0 23
DocExpirationUpdateProcessorFactory definition in solrconfig.xml:
<updateRequestProcessorChain name="exhibitor-product-chain">
<processor class="solr.CloneFieldUpdateProcessorFactory">
<str name="source">P_SupplierId</str>
<str name="source">P_TradeShowId</str>
<str name="source">P_ProductId</str>
<str name="dest">id</str>
</processor>
<processor class="solr.ConcatFieldUpdateProcessorFactory">
<str name="fieldName">id</str>
<str name="delimiter"></str>
</processor>
<processor class="solr.TolerantUpdateProcessorFactory">
<int name="maxErrors">-1</int>
</processor>
<processor class="solr.processor.DocExpirationUpdateProcessorFactory">
<null name="ttlFieldName"/>
<null name="ttlParamName"/>
<int name="autoDeletePeriodSeconds">86400</int>
<str name="expirationFieldName">P_TradeShowOnlineEndDate</str>
</processor>
<processor class="solr.LogUpdateProcessorFactory" />
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>
<field name="P_TradeShowOnlineEndDate" type="date" indexed="true"
stored="true" multiValued="false"/>
Derek
----------------------
CONFIDENTIALITY NOTICE
This e-mail (including any attachments) may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please inform the sender immediately and delete this e-mail (including any attachments) from your computer, and you must not use, disclose to anyone else or copy this e-mail (including any attachments), whether in whole or in part.
This e-mail and any reply to it may be monitored for security, legal, regulatory compliance and/or other appropriate reasons.
Re: change DocExpirationUpdateProcessorFactory deleteByQuery NOW
parameter time zone
Posted by Derek Poh <dp...@globalsources.com>.
SG refers to Singaporeand the time is UTC +8.
That means I need to set the P_TradeShowOnlineEndDate date to UTC
instead of UTC +8 as a workaround to it.
On 31/8/2018 10:16 PM, Shawn Heisey wrote:
> On 8/30/2018 7:26 PM, Derek Poh wrote:
>> Can the timezone of the NOW parameter in the |deleteByQuery| of the
>> DocExpirationUpdateProcessorFactory be change to my timezone?
>>
>> I am in SG and using solr 6.5.1.
>
> I do not know what SG is.
>
> The timezone cannot be changed. Solr *always* handles dates in UTC.
> You can assign a timezone when doing date math, but this is only used
> to determine when a new day or week starts -- the dates themselves
> will be in UTC.
>
> Thanks,
> Shawn
>
>
----------------------
CONFIDENTIALITY NOTICE
This e-mail (including any attachments) may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please inform the sender immediately and delete this e-mail (including any attachments) from your computer, and you must not use, disclose to anyone else or copy this e-mail (including any attachments), whether in whole or in part.
This e-mail and any reply to it may be monitored for security, legal, regulatory compliance and/or other appropriate reasons.
Re: change DocExpirationUpdateProcessorFactory deleteByQuery NOW
parameter time zone
Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/30/2018 7:26 PM, Derek Poh wrote:
> Can the timezone of the NOW parameter in the |deleteByQuery| of the
> DocExpirationUpdateProcessorFactory be change to my timezone?
>
> I am in SG and using solr 6.5.1.
I do not know what SG is.
The timezone cannot be changed. Solr *always* handles dates in UTC.
You can assign a timezone when doing date math, but this is only used to
determine when a new day or week starts -- the dates themselves will be
in UTC.
Thanks,
Shawn