Question

Is there a way to view the request the client is about to send to the server? For instance:

SolrQuery solrQuery = new SolrQuery(query);
solrQuery.setRows(rows);
solrQuery.setIncludeScore(true);

solrQuery.setParam("defType","edismax");
solrQuery.setParam("debugQuery", "true");

// would like to preview the current built up request here
QueryResponse resp = _server.query(solrQuery);
Was it helpful?

Solution

SolrQuery.toString method gives all the parameters which you can log.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top