The panko.storage.impl_elasticsearch Module

class panko.storage.impl_elasticsearch.Connection(url, conf)[source]

Bases: panko.storage.base.Connection

Put the event data into an ElasticSearch db.

Events in ElasticSearch are indexed by day and stored by event_type. An example document:

{"_index":"events_2014-10-21",
 "_type":"event_type0",
 "_id":"dc90e464-65ab-4a5d-bf66-ecb956b5d779",
 "_score":1.0,
 "_source":{"timestamp": "2014-10-21T20:02:09.274797"
            "traits": {"id4_0": "2014-10-21T20:02:09.274797",
                       "id3_0": 0.7510790937279408,
                       "id2_0": 5,
                       "id1_0": "18c97ba1-3b74-441a-b948-a702a30cbce2"}
           }
}
get_event_types()[source]
get_events(event_filter, pagination=None)[source]
get_trait_types(event_type)[source]
get_traits(event_type, trait_type=None)[source]
record_events(events)[source]
upgrade()[source]