Last active
May 25, 2017 15:07
-
-
Save saniyat/9a3f36d446eb93f5dbbd41e3acabf3bc to your computer and use it in GitHub Desktop.
Solr query
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 | |
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