Analyzing entities in queries