Hi,
Is there a way to expose the index's raw data? Much like the query sandbox used to do as a proof of concept.
Best Regards,
Nuno Aguiar
Hi,
Is there a way to expose the index's raw data? Much like the query sandbox used to do as a proof of concept.
Best Regards,
Nuno Aguiar
Hi Nuno
In 8.7 it is called the Querypublisher and does just that.
BR Nicolai
Hi Nicolai,
I though as much, but how can I expose the entire index result. I was trying this but always get a null results
@inherits RazorTemplateBase<RazorTemplateModel<Template>>
@using Dynamicweb.Rendering;
@using System.Collections.Specialized;
@{
Dynamicweb.Querying.IQueryResult queryResult = GetValue("QueryResultItem") as Dynamicweb.Querying.IQueryResult;
if (queryResult != null)
{
<pre>Count: @queryResult.Count</pre>
<pre>Total count: @queryResult.TotalCount</pre>
<pre>@Newtonsoft.Json.JsonConvert.SerializeObject(queryResult.QueryResult, Newtonsoft.Json.Formatting.Indented)</pre>
}
else
{
<pre>null query result</pre>
}
}
Is this accurate?
Best Regards,
Nuno Aguiar
ok, thanks
You dont get the total number of items in the query. You get total number of pages, and total number of items on a page.
Ex. from a query result you get 10 pages, with 10 items on each page. To find the total number of items you cant just say 10 x 10 = 100, but since there can be all from 1 to 10 items on the last page, the total can be all from 91 to 100.
Would be nice to get the total number of items in the query result.
Hm, good point - just added the tag QueryResult.TotalCount out with the next update of Dynamicweb.QueryPublisher (1.1.1), TFS#35141
BR Nicolai
Perfect, and thanks for quick action :)
You must be logged in to post in the forum