Because you have to train to get it transferred into the model/index and you have input it to the EventStore with a different name than you sent in with $set.
Once you have made both names the same and retrain you will get a datetime mapping in the Index. On Jan 9, 2017, at 11:30 AM, Harsh Mathur <[email protected]> wrote: Also what am not able to understand is in ES, the mapping for datefield (for both releaseDate and release_date) is string not analysed instead of operational datetime. Regards Harsh Mathur [email protected] <mailto:[email protected]> “Perseverance is the hard work you do after you get tired of doing the hard work you already did." On Tue, Jan 10, 2017 at 12:58 AM, Harsh Mathur <[email protected] <mailto:[email protected]>> wrote: Hi Pat, Thank you :) I mean to take the first approach and thats why my engine.json looks like : "dateName":"releaseDate" // our datefield Below you are setting up a date attached to items and have called it “releaseDate" in one place but set it using $set events to be “release_date”, different strings. This is probably your error, you didn’t send the error. By this you mean to send events as // releaseDate same as mentioned in engine.json { "event" : "$set", "entityType" : "item", "entityId" : "some-item-id", "properties" : { "releaseDate": "2016-04-15T03:34:05Z" }, "eventTime" : "2016-04-15T03:34:05Z" } or send event in with release_date { "event" : "$set", "entityType" : "item", "entityId" : "some-item-id", "properties" : { "release_date": "2016-04-15T03:34:05Z" }, "eventTime" : "2016-04-15T03:34:05Z" } Btw, The Error message in subject stopped appearing in log after I started querying { "dateRange": { "name": "releaseDate", "before": "" // date string in iso format, "after": "" // date string in iso format } } Regards Harsh Mathur [email protected] <mailto:[email protected]> “Perseverance is the hard work you do after you get tired of doing the hard work you already did." On Mon, Jan 9, 2017 at 11:36 PM, Pat Ferrel <[email protected] <mailto:[email protected]>> wrote: Sorry typos: no, that is talking about using a date range in the query. Answer this first. Do you want: 1) a single fixed date attached to itmes with the range in the query 2) an expired/available attached to items and the current date that must fall between them? You can’t do both so pick on or the other. Below you are setting up a date attached to items and have called it “releaseDate" in one place but set it using $set events to be “release_date”, different strings. This is probably your error, you didn’t send the error. On Jan 9, 2017, at 8:56 AM, Pat Ferrel <[email protected] <mailto:[email protected]>> wrote: no, that is talking about using a date range in the query. Answer this first: Do you want a fixed date attached to itmes with the rang in the query or an expired/available attached to items and the corrent date that must fall between them? Pick on or the other. Below you are setting up a date attached to items and have called it “releaseDate" in one place but set it using $set events to be “release_date”, different strings. On Jan 9, 2017, at 3:15 AM, Harsh Mathur <[email protected] <mailto:[email protected]>> wrote: Found it. Thanks a lot :) https://groups.google.com/forum/#!msg/actionml-user/z1eJdXniKl0/0VgKjuLgBwAJ <https://groups.google.com/forum/#!msg/actionml-user/z1eJdXniKl0/0VgKjuLgBwAJ> Regards Harsh Mathur [email protected] <mailto:[email protected]> “Perseverance is the hard work you do after you get tired of doing the hard work you already did." On Mon, Jan 9, 2017 at 4:06 PM, Harsh Mathur <[email protected] <mailto:[email protected]>> wrote: Hi, I have not been able to correctly set up dates for items. I am using the following approach: specifying date range in query and comparing to date attached to items.(http://actionml.com/docs/ur_advanced_tuning <http://actionml.com/docs/ur_advanced_tuning>) engine.json: "algorithms": [ { "comment": "simplest setup where all values are default, popularity based backfill, must add eventsNames", "name": "ur", "params": { "appName": "MyApp1", "indexName": "urindex", "typeName": "items", "comment": "must have data for the first event or the model will not build, other events are optional", "eventNames": ["purchase","preview", "view" ], "dateName":"releaseDate" // our datefield } } ] I am sending event as { "event" : "$set", "entityType" : "item", "entityId" : "some-item-id", "properties" : { "releaseDate": "2016-04-15T03:34:05Z" }, "eventTime" : "2016-04-15T03:34:05Z" } When I check ES, the releaseDate field is mapped as string instead of DateTime: ES Mapping: "releaseDate" : { "type" : "string", "index" : "not_analyzed" }, "release_date" : { "type" : "string", "index" : "not_analyzed" }, Misconfigured date information, either your engine.json date settings or your query's dateRange is incorrect. This error keeps getting printed in the logs. Any help appreciated. Thanks a lot in advance. Regards Harsh Mathur [email protected] <mailto:[email protected]> “Perseverance is the hard work you do after you get tired of doing the hard work you already did."
