Search query working in One environment and not in another

I absolutely agree with you, but the question is why the same code ( using the same query, same mapping, similar data) is working in other environments?

Thanks!