Similar Items: Efficient Temporal Datalog Materialisation for Composite Event Recognition