Reputation: 95
I have a bunch of tweet data in JSON that I'm experimenting in ML 8. I am curious as to how I can create a date index for the created_at property.
There are two distinct issues:
Still waiting for parse-ietf-date() from Path 3.1 ...
Thoughts?
I had thought about doing a content transform to extract certain key bits of related information. Then I could format the data properly, index the extraction, and point to the JSON data by the tweet identifier string.
Upvotes: 3
Views: 139
Reputation: 7335
I may not understand because it seems to me that there's only one issue.
You can create a datatyped range index over JSON text values in the same way that you can create a datatyped range index over XML text values. The document doesn't have to declare the datatype of the text so long as the text can be parsed with the correct datatype.
For an xs:dateTime index, the date needs to be in ISO 8601 format at present. JavaScript Date, however, supports RFC 2822 with the parse() function and ISO 8601 with the toISOString() function, so a transform should be possible, which could either replace the property value or emit a new property with a different format.
Hoping that helps.
Upvotes: 5