Skip to content

Instantly share code, notes, and snippets.

@jdsimcoe
Last active December 26, 2015 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdsimcoe/7092481 to your computer and use it in GitHub Desktop.
Save jdsimcoe/7092481 to your computer and use it in GitHub Desktop.
teachings-mapping-php
<?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