Skip to content

Instantly share code, notes, and snippets.

@saniyat
Last active May 25, 2017 15:07
Show Gist options
  • Save saniyat/9a3f36d446eb93f5dbbd41e3acabf3bc to your computer and use it in GitHub Desktop.
Save saniyat/9a3f36d446eb93f5dbbd41e3acabf3bc to your computer and use it in GitHub Desktop.
Solr query
<?php
function check_solr_query() {
$solr = apachesolr_get_solr();
$query = apachesolr_drupal_query('apachesolr', array('q' => 'dog'));
$resp = $query->search();
$data = array();
foreach($resp->response->docs as $d) {
$data[$d->entity_id] = $d->label;
}
dpm($data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment