views:

26

answers:

1

Hello, I would like to be able to show in my UI what the query terms were that solr used to run the final query. For example, I might type the query "run" but behind the scenes solr will use stemming to also query "ran" and "running", I may also have a synonym defined which has "run = sprint".

I would like to show the user that although they typed in "run" the actual query was "run ran running sprint"

Any easy way to do this?

Thanks!

+1  A: 

Try setting debugQuery=on. See this and this.

Mauricio Scheffer
Thanks Mauricio.Do you know how much of a performance hit this is (if any)?Would you know of any way to get the same information without the other debugging information?It doesn't seem right to be using debugQuery in a production system.
Pinguthepenguin
@Pinguthepenguin: Re performance: measure it. It's not free, that's for sure, but I don't think it will be too slow either. I don't know any other way to do this, it's only available through debugQuery since it *is* a debugging tool and not something that is normally exposed to the end user.
Mauricio Scheffer