First working query example with promise based backend
Change-Id: Iee7360d123dc09876d942a32013077d78ea50b91
diff --git a/templates/search2.html.ep b/templates/search2.html.ep
index 6ed9c9e..200d693 100644
--- a/templates/search2.html.ep
+++ b/templates/search2.html.ep
@@ -1,6 +1,6 @@
% layout 'main', title => loc('searchtitle', q => stash('q'), ql => stash('ql')), schematype => 'SearchResultsPage';
-<div id="resultinfo" <% if (stash('results_size')) { %> class="found"<%} %>>
+<div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>>
<div id="pagination"><%= pagination(stash('start_page'), stash('total_pages'), url_with->query(['p' => '{page}'])) =%></div>
% my $found = stash('total_results');
<p class="found">\
@@ -11,7 +11,7 @@
% };
<span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\
%# <% if (stash('benchmark')) { %> (~ <%= stash('benchmark') %>)<% } %>
-% } elsif (stash('start_index') == 0 && stash('result_size') == 0) {
+% } elsif (stash('start_index') == 0 && stash('results')->size == 0) {
<span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\
% };
</p>
@@ -20,13 +20,13 @@
%= include 'query2'
<div id="search">
-% if (stash('total_results') != 0 && stash('result_size')) {
+% if (stash('total_results') != 0 && stash('results')->size) {
<ol class="align-left">
%= search_results begin
%= include 'match', match => $_
% end
</ol>
-% } elsif (stash('result_size') == 0) {
+% } elsif (stash('results')->size == 0) {
<p id="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
% }
</div>