         index_date = tz(obj.time,"%F")
 
         time = new Date( obj.time )
+
+        # clean up IPv4 IP addresses stuck in IPv6
+        if obj.client?.ip
+            obj.client.ip = obj.client.ip.replace /^::ffff:/, ""
 
         @_indicesForTimeRange "listens", time, (err,idx) =>
 

                    type:   "string"
                    index:  "not_analyzed"
                ip:
                    type:   "ip"
                ua:
                    type:   "string"
                path:

                            type:   "long"
                            include_in_all: false
                        ips:
                            type:   "string"
                            index:  "not_analyzed"
                            index_name: "ip"
        listens:
            settings:
