Hi,
I have been trying to figure out why I cannot get a match when doing exact match on a datetime with milliseconds. Something I find odd is how the index is storing the milliseconds. The date "2021-12-14T11:22:28.322Z" is indexed as "2021-12-14T11:22:28.0000322Z". Why the zero prefill?
I have created a document via the raven db studio. Can you please confirm if this is a bug or expected?
Document:
{
"Name": "2021-12-14T11:22:28.322Z",
"@metadata": {
"@collection": "Dog"
}
}
Index:
docs.Dog.Select(x => new {
Name = x.Name
})
Indexed Data:
{
"Name": "2021-12-14T11:22:28.0000322Z",
"Name_Time": [
" \u0001\blo^@\u00172fB",
"$\bFf}t\u0001;\u00164",
"(D67o \u000bY3",
",\u0004#3>z\u0000]K",
"0\"\u001b\u001bwP\u0005l",
"4\u0002\u0011Y_=\u0000.",
"8\u0011\rM{h\u0002",
"<\u0001\blo^@",
"@\bFf}t",
"DD67o",
"H\u0004#3>",
"L\"\u001b\u001b",
"P\u0002\u0011Y",
"T\u0011\r",
"X\u0001\b",
"\\\b"
],
"id()": "d106c204-1c1c-43f3-91e7-fc967a3e6084",
"@metadata": {
"@attachments": [],
"@counters": [],
"@timeseries": []
}
}
Query
Name = "2021-12-14T11:22:28.322Z" matches
Name = "2021-12-14T11:22:28.0000322Z" matches
Name = "2021-12-14T11:22:28.3220000Z" does not match
It is the last one that is causing me issues, I need to remove trailing zeros.
Cheers,
Iain