//show the full text content in the results
// useful for chat logs in which every line is its own document
'showFullContent' => false,
+ //search result "hit" template file
+ 'hitTemplate' => 'hit.htm',
);
?>
\ No newline at end of file
--- /dev/null
+{% set doc = hit._source %}
+<li class="hit hit-chat">
+ <span class="text">
+ {{doc.htmlText|raw}}
+ </span>
+ <br/>
+ <span class="meta">
+ {% if doc.author.name %}
+ <em>
+ {% if doc.author.url %}
+ <a href="{{doc.author.url}}">{{doc.author.name}}</a>
+ {% else %}
+ {{doc.author.name}}
+ {% endif %}
+ </em>
+ at
+ {% endif %}
+ {% if doc.modate %}
+ <a href="{{doc.extra.cleanUrl}}" class="date">{{doc.modate|date("Y-m-d H:i")}}</a>
+ {% endif %}
+ </span>
+</li>
</p>
<ul class="hits">
{% for hit in hits %}
- {% include 'search/hit.htm' %}
+ {% include hitTemplate %}
{% endfor %}
</ul>
{% include 'pager.htm' %}
.resultinfo {
margin-top: 1ex;
margin-bottom: 2ex;
-}
\ No newline at end of file
+}
+
+.hit-chat .meta {
+ margin-left: 3ex;
+}
+.hit-chat .date {
+ color: inherit;
+}
+.hit-chat .meta {
+ opacity: 0.5;
+}
'sort' => $sort,
'urlSortRelevance' => $urlSortRelevance,
'urlSortDate' => $urlSortDate,
+ 'hitTemplate' => 'search/' . $GLOBALS['phinde']['hitTemplate'],
)
);
?>