Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rekall
laravel-scout-solr
Commits
5a475041
Commit
5a475041
authored
May 28, 2018
by
Bert Balcaen
Browse files
Removing logic to set fields to 'null'.
parent
02b72dcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/SolrEngine.php
View file @
5a475041
...
...
@@ -19,16 +19,6 @@ class SolrEngine extends Engine
$update
=
\
Solr
::
createUpdate
();
$models
->
each
(
function
(
$model
)
use
(
&
$update
)
{
$searchableArray
=
$model
->
toSearchableArray
();
foreach
(
$searchableArray
as
$key
=>
$value
)
{
if
(
empty
(
$value
)
&&
!
is_numeric
(
$value
))
{
if
(
is_array
(
$value
))
{
$value
=
[
'null'
];
}
else
{
$value
=
'null'
;
}
$searchableArray
[
$key
]
=
$value
;
}
}
$document
=
$update
->
createDocument
(
$searchableArray
);
$update
->
addDocument
(
$document
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment