Bugfix Preview Highlight
@@ -135,11 +135,9 @@ AjaxFranceLabs.QueryHighlightingWidget = AjaxFranceLabs.FacetCore.extend({
widgetContentDiv.html("");
if (data != undefined && data != null) {
// Retrieve the query highlighting if any
- var highlighting = data.highlighting;
+ var fileHighlighting = data.highlighting[docId];
var termsCollection = [];
// Fill the termsCollection with the terms found in the query highlighting
- for ( var file in highlighting) {
- var fileHighlighting = highlighting[file];
for ( var highlightField in fileHighlighting) {
if (highlightField.indexOf("content") != -1 || highlightField == "exactContent") {
if (fileHighlighting[highlightField].length > 0) {
@@ -156,7 +154,6 @@ AjaxFranceLabs.QueryHighlightingWidget = AjaxFranceLabs.FacetCore.extend({
}
}
}
- }
// For each term, create a term button
if (termsCollection.length > 0) {
