Reputation: 6957
Given a QueryResponse object (SolrJ 3.6.2), is there any way to retrieve the query that was made to get that response other than parsing the query string?
Upvotes: 0
Views: 594
Reputation: 61
QueryResponse exposes the Header information from which the q can be retrieved. But it cant be directly retrived directly as mentioned by Jayendra.
You need to use:
response.getHeader().get("params");
This will give you a result like:
{start=0,q=apple,qf=name^10.0 description^5.0,version=2,rows=10,defType=edismax}
There you can see your result.
Upvotes: 1