proximity queries

Does A appear within N spaces of B in a document?

If so, return it