Skip to content

Commit

Permalink
Added query parameter to fetch json formatted response from solr.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumit Madan committed Sep 4, 2024
1 parent 9d8adf1 commit 2531fa2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ public function buildForm(
ServerInterface $search_api_server = NULL
): array {
$file_list = $this->pantheonGuzzle
->getQueryResult('admin/file', ['query' => ['action' => 'VIEW']]);
->getQueryResult('admin/file', [
'query' => [
'action' => 'VIEW',
'wt' => 'json',
],
]);
$form['status'] = [
'#type' => 'vertical_tabs',
'#title' => $this->t('Pantheon Search Files'),
Expand Down
2 changes: 2 additions & 0 deletions src/Commands/Diagnose.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public function diagnose() {
$indexedStats = $this->pantheonGuzzle->getQueryResult('admin/luke', [
'query' => [
'stats' => 'true',
'wt' => 'json',
],
]);
if ($this->output()->isVerbose()) {
Expand All @@ -173,6 +174,7 @@ public function diagnose() {
$beans = $this->pantheonGuzzle->getQueryResult('admin/mbeans', [
'query' => [
'stats' => 'true',
'wt' => 'json',
],
]);
if ($this->output()->isVerbose()) {
Expand Down
1 change: 1 addition & 0 deletions src/Commands/TestIndexAndQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public function testIndexAndQuery() {
'query' => [
'q' => 'index_id:' . $index->id(),
'fields' => ['id', 'index_id', 'name'],
'wt' => 'json',
],
]);
if ($result['response']['numFound'] === 1) {
Expand Down
1 change: 1 addition & 0 deletions src/Plugin/SolrConnector/PantheonSolrConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ public function getFile($file = NULL) {
}
return $this->pantheonGuzzle->get('admin/file', [
'query' => $query,
'wt' => 'json',
]);
}

Expand Down

0 comments on commit 2531fa2

Please sign in to comment.