b1689511 by Adam Heath

Breaking change: pass options to searchParseDoc, instead of separate

arguments.
1 parent 7b73d909
......@@ -243,11 +243,14 @@ define(function(require) {
var self = this;
_.each(data.response.docs, function(doc, index) {
var docOptions = _.clone(options);
var itemHighlighting = highlighting[doc.id];
if (!itemHighlighting) {
itemHighlighting = {};
}
list.push(self.searchParseDoc(doc, index, itemHighlighting));
docOptions.solrItemHighlighting = itemHighlighting;
docOptions.solrIndex = index;
list.push(self.searchParseDoc(doc, docOptions));
});
return {
......@@ -261,7 +264,9 @@ define(function(require) {
hasResults: list.length > 0,
};
},
searchParseDoc: function searchParseDoc(doc, index, itemHighlighting) {
searchParseDoc: function searchParseDoc(doc, options) {
var index = options.solrIndex;
var itemHighlighting = options.solrItemHighlighting;
var fieldsToParse = Util.mergeStaticProps(this.constructor, Solr, {}, 'parsedFieldMap');
var result = {};
_.each(fieldsToParse, function(value, key) {
......