lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Ambiguous response on TrieDateField
Date Thu, 03 Aug 2017 14:52:17 GMT
Solr only deals with UTC times. My bet: you're seeing the _stored_
value of the time which is PDT. How are you indexing this field? You
have to have something hanging around that converts the input to
UTC...

Best,
Erick

On Thu, Aug 3, 2017 at 2:48 PM, Imran Rajjad <imran@elogic.pk> wrote:
> Hello,
>
> I have observed a difference of Day in TrieDateField when queried from Solr Cloud web
interface and SolrK (Java API)
>
> Below is the query response from Web Interface
>
> {
>   "responseHeader":{
>     "zkConnected":true,
>     "status":0,
>     "QTime":22,
>     "params":{
>       "q":"id:01af04e1-83ce-4eb0-8fb5-dc737115dcce",
>       "indent":"on",
>       "fl":"dateTime",
>       "sort":"dateTime asc, id asc",
>       "rows":"100",
>       "wt":"json",
>       "_":"1501792144786"}},
>   "response":{"numFound":1,"start":0,"docs":[
>       {
>         "dateTime":"2017-06-17T00:00:00Z"}]
>   }}
>
> The same query run from SolrJ shows previous day in the same field
>
> query.setQuery("id:01af04e1-83ce-4eb0-8fb5-dc737115dcce");
> query.setFields(""dateTime");
> query.addSort("dateTime", ORDER.asc);
> query.addSort("id", ORDER.asc);
> query.add("wt","json");
>
> gives
> {responseHeader={zkConnected=true,status=0,QTime=24,params={q=id:01af04e1-83ce-4eb0-8fb5-dc737115dcce,_stateVer_=cdr2:818,fl=dateTime,sort=dateTime
asc,id asc,wt=javabin,version=2}},response={numFound=1,start=0,docs=
> [SolrDocument{dateTime=Fri Jun 16 17:00:00 PDT 2017}]}}
>
> The problem was found when the a filter query (dateTime:[ 2017-06-17T00:00:00Z TO 2017-06-18T00:00:00Z])
was done for the records of 17 June only, however the solrJ response shows some documents
with June16 also. Running facet query from web interface shows no records from June16
>
>
> Regards,
> Imran
>
> Sent from Mail for Windows 10
>

Mime
View raw message