Please have a look why sphinx search does not behaves the same.
Actually, this behavior should be handled by an event subscriber instead of being handled by search engine