private void Explain(DocumentsOperationContext context, string indexName) { var indexQuery = IndexQueryServerSide.Create(HttpContext, GetStart(), GetPageSize(Database.Configuration.Core.MaxPageSize), context); var runner = new QueryRunner(Database, context); var explanations = runner.ExplainDynamicIndexSelection(indexName, indexQuery); using (var writer = new BlittableJsonTextWriter(context, ResponseBodyStream())) { var isFirst = true; writer.WriteStartArray(); foreach (var explanation in explanations) { if (isFirst == false) { writer.WriteComma(); } isFirst = false; writer.WriteExplanation(context, explanation); } writer.WriteEndArray(); } }