ehime

Solr Sample

Apr 25th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. $closure = function (array $records, $callback) USE (&$set) {
  2.     foreach ($records AS $key => $value)
  3.     {
  4.         $set[$key] = New SolrInputDocument();
  5.         if (is_array($value)) {
  6.             $set[$key]->addDocument($value, $callback);
  7.         } else {
  8.             $callback($value, $key);
  9.         }
  10. };
Advertisement
Add Comment
Please, Sign In to add comment