elasticsearchtimelion

Timelion syntax doesn't work


I'm trying to use timelion.

When I tried es(*) function, I got no result.

I have a dataset in elasticsearch, and structure is

{
    "_index": "test",
    "_type": "testtype",
    "_id": "abcdefg0",
    "_score": 1,
    "_source": {
        "name": "name",
        "gender": "Male",
        "timestamp": "2016-07-26T06:10:56Z"
        "is_foreigner": false
    }
}

all fields consist of string type except timestamp field. (timestamp field consists of date type)

Do I need additional field? or Do I need to add any number field?


Solution

  • I found solution.

    timestamp field name is wrong.

    You must use @timestmap as timestamp field.

    Or, if you want to use custom field, Go to timelion.json file and change timelion configuration.

    "es": {
        "timefield": "timestamp",
        "default_index": "sensor_log",
        "allow_url_parameter": false
     }
    

    like this.

    timelion.json default value is

    "es": {
        "timefield": "@timestamp",
        "default_index": "sensor_log",
        "allow_url_parameter": false
     }
    

    Self question, self answer :(

    Anyway, I could help somebody through this answer. :)