@@ -17,8 +17,8 @@ public function elasticMapping() {
17
17
return array (
18
18
'id ' => array ('type ' => 'string ' , 'index ' => 'not_analyzed ' ),
19
19
'full_name ' => array ('type ' => 'string ' ),
20
- 'first_name ' => array ('type ' => 'string ' ),
21
- 'last_name ' => array ('type ' => 'string ' ),
20
+ 'first_name ' => array ('type ' => 'string ' , ' include_in_all ' => false ),
21
+ 'last_name ' => array ('type ' => 'string ' , ' include_in_all ' => false ),
22
22
'companies ' => array (
23
23
'type ' => 'object ' ,
24
24
'properties ' => array (
@@ -29,7 +29,7 @@ public function elasticMapping() {
29
29
'state ' => array ('type ' => 'string ' ),
30
30
'country ' => array ('type ' => 'string ' ),
31
31
'zip ' => array ('type ' => 'string ' ),
32
- 'website ' => array ('type ' => 'string ' , 'length ' => 2048 ),
32
+ 'website ' => array ('type ' => 'string ' , 'length ' => 2048 ),
33
33
'location ' => array ('type ' => 'geo_point ' , 'lat_lon ' => true ),
34
34
)
35
35
),
@@ -103,7 +103,7 @@ function afterSave($created) {
103
103
$ esData = $ this ->esDenormalize ($ this ->data );
104
104
$ this ->switchToElastic ();
105
105
$ this ->create ();
106
- $ this ->save ($ this -> data , ['callbacks ' => 'false ' ]);
106
+ $ this ->save ($ esData , ['callbacks ' => 'false ' ]);
107
107
$ this ->switchToDatabase ();
108
108
}
109
109
0 commit comments