Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
solr-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b1689511
authored
2016-11-29 14:50:42 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Breaking change: pass options to searchParseDoc, instead of separate
arguments.
1 parent
7b73d909
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
src/scripts/solr/model/Solr.js
src/scripts/solr/model/Solr.js
View file @
b168951
...
...
@@ -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
)
{
...
...
Please
register
or
sign in
to post a comment