simplified to be a companion extension to kdyby elasticsearch extension