Map = docs => from doc in docs
where (doc.ResourceType == "Hub" &&
doc.IsDeleted == false &&
!doc.Id.EndsWith("/published") &&
!doc.Id.Contains("/revisions/"))
select new
{
doc.Id,
doc.LastEditedBy,
doc.LastEditedOn,
doc.Title,
doc.TitleForSorting,
doc.Source,
doc.ResourceType,
Publisher = doc.Publisher.Length == 0 ? new[] {"UNSET"} : doc.Publisher,
doc.CreatedBy,
doc.CreatedOn,
doc.LastPublishedOn,
doc.Status,
ExpiryDate = doc.ExpiryDate ?? new DateTime(1902, 01, 01),
ReviewDate = doc.ReviewDate ?? new DateTime(1902, 01, 01),
doc.SubjectArea,
doc.PublicationType,
AreaOfInterest = doc.AreaOfInterest ?? new [] {"UNSET"},
doc.Topic,
PublicationDate = doc.PublicationDate ?? new DateTime(1902,01,01)
};
Note when you remove the ExpiryDate, ReviewDate and PublicationDate it works ok, its seems that the documents are being stored different now?
Here is the fields in an example document that blows up:
"PublicationDate": "2009-06-02T01:00:00.0000000+01:00",
"ReviewDate": "2011-08-06T01:00:00.0000000+01:00",
"ExpiryDate": "",
Is there anything i am doing wrong?
Regards,
Lee
--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "ravendb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/pENFQOng6nE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ravendb+u...@googlegroups.com.