-1

i am changing search from lucene to solr and faced an issue in this , i have DateTime a field in sitecore and an item is using that field and have value of now ( DATE -- 4/4/2019 TIME -- 12:00 AM) but when i have rebuild the indexing , in solr that field ( date_tdt ) is not giving the same value as declared in sitecore rather it is showing date_tdt = "2014-11-05T00:00:00Z" , i dont know why it is showing some other date and when i am generating query to match that date using Date filterSearch = filterSearch.And(x => x.Date >= DateTime.Now.ToUniversalTime()); it is generating date_tdt:[2019-04-04T17:53:34.483Z TO *] in the search log . Don`t know why it is happening .

1
  • If I'm understanding you correctly it sounds like you have a discrepancy in the date - you're expecting 4/4/2019 and seeing 5/11/2014. Are you sure you're looking at the right item in Solr? What does your query look like?
    – sitecorium
    May 20 '19 at 9:55
1

Dates are stored as UTC. What you are seeing is the value with timezone information.

I would suggest you check the raw field value and then make sure your field is actually crawled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.