- Fix output showing result range if total results is less than the query 'limit'

- Show date stamp of each result.
This commit is contained in:
Jordan Sissel 2010-05-03 21:36:07 +00:00
parent 9795bb56b5
commit 5e955a47ba

View file

@ -10,7 +10,7 @@
<div id="visual" style="width:850px;height:200px;"></div>
<h4>Results <%= params[:offset] %> - <%= params[:offset] + params[:limit] %> of <%= @hits %> for <%=h params[:q] %></h4>
<h4>Results <%= params[:offset] %> - <%= [@hits,params[:offset] + params[:limit]].min %> of <%= @hits %> for <%=h params[:q] %></h4>
<% if params[:offset] > 0 %>
<%= link_to "first", url(:controller => "search", :action => "query",
:q => params[:q],
@ -40,7 +40,7 @@
<pre>
<% @results.each do |result| -%>
<%=h result["_source"]["@DATE"] %> | <%=h result["_source"]["@LINE"] %>
<%=h Time.at(result["_source"]["@DATE"]) %> | <%=h result["_source"]["@LINE"] %>
<% end -%>
</pre>