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
ff23b815
Commit
ff23b815
authored
May 22, 2018
by
Bert Balcaen
Browse files
Setting all empty vals to 'null'.
parent
09322682
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/SolrEngine.php
View file @
ff23b815
...
...
@@ -21,10 +21,10 @@ class SolrEngine extends Engine
$searchableArray
=
$model
->
toSearchableArray
();
foreach
(
$searchableArray
as
$key
=>
$value
)
{
if
(
empty
(
$value
))
{
if
(
is_
string
(
$value
))
{
$value
=
'NOT_SET'
;
}
else
if
(
is_array
(
$value
))
{
$value
=
[
'NOT_SET'
]
;
if
(
is_
array
(
$value
))
{
$value
=
[
'null'
]
;
}
else
{
$value
=
'null'
;
}
$searchableArray
[
$key
]
=
$value
;
}
...
...
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