Somewhere along the experience with Apache Solr (and not only Solr), you'll end up at a point where some of your queries are not running as you would like them to run – some of them are just slow. Of course, such a situation is not desirable and we have to do something to make those queries run faster. But how do we know which part of the query is the one we should look at ? This recipe will tell you what information you can get from Solr.
The following steps will help you analyze query performance:
Let's start with the assumption that we have a query that has parts that are not as fast as we would like it to be. The query is as follows:
http://localhost:8983/solr/select?q=metal&facet=true&facet.field=date&facet.query=from:[10+TO+2000]
In order to get the information we want, we need to add the
debugQuery=true
parameter to our query, so that it looks similar to the following code snippet:http://localhost:8983/solr/select?q=metal&facet...