You shouldn't put it anywhere. Spelling correction should depend on the indexed data, which may change every time we re-index. That's why I would push very hard for using elasticsearch's built-in functionality.