@@ -17,8 +17,8 @@ public function elasticMapping() {
1717 return array (
1818 'id ' => array ('type ' => 'string ' , 'index ' => 'not_analyzed ' ),
1919 '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 ),
2222 'companies ' => array (
2323 'type ' => 'object ' ,
2424 'properties ' => array (
@@ -29,7 +29,7 @@ public function elasticMapping() {
2929 'state ' => array ('type ' => 'string ' ),
3030 'country ' => array ('type ' => 'string ' ),
3131 'zip ' => array ('type ' => 'string ' ),
32- 'website ' => array ('type ' => 'string ' , 'length ' => 2048 ),
32+ 'website ' => array ('type ' => 'string ' , 'length ' => 2048 ),
3333 'location ' => array ('type ' => 'geo_point ' , 'lat_lon ' => true ),
3434 )
3535 ),
@@ -103,7 +103,7 @@ function afterSave($created) {
103103 $ esData = $ this ->esDenormalize ($ this ->data );
104104 $ this ->switchToElastic ();
105105 $ this ->create ();
106- $ this ->save ($ this -> data , ['callbacks ' => 'false ' ]);
106+ $ this ->save ($ esData , ['callbacks ' => 'false ' ]);
107107 $ this ->switchToDatabase ();
108108 }
109109
0 commit comments