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 <p...@occamsmachete.com> 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 <harshmathur.1...@gmail.com 
<mailto:harshmathur.1...@gmail.com>> 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
harshmathur.1...@gmail.com <mailto:harshmathur.1...@gmail.com>

“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 <harshmathur.1...@gmail.com 
<mailto:harshmathur.1...@gmail.com>> 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
harshmathur.1...@gmail.com <mailto:harshmathur.1...@gmail.com>

“Perseverance is the hard work you do after you get tired of doing the hard 
work you already did."




Reply via email to