Last active
December 26, 2015 04:19
-
-
Save jdsimcoe/7092481 to your computer and use it in GitHub Desktop.
teachings-mapping-php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class elasticsearch_teachings { | |
public function mapData(Array $data, Entry $entry) { | |
$json = array(); | |
// var_dump($data); | |
$json['_boost'] = 1; | |
$json['title'] = $data['title']['value']; | |
$json['book'] = $data['book']['value']; | |
$json['chapter'] = $data['chapter']['value']; | |
$json['description'] = $data['description']['value']; | |
return $json; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment