Skip to content

Commit

Permalink
Update addDocument method to use types
Browse files Browse the repository at this point in the history
Updated addDocument method to add the data under appropriate Qubit types
  • Loading branch information
anvit committed Jun 18, 2024
1 parent aef0e18 commit f78050c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/arSolrPlugin/lib/arSolrPlugin.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ public function addDocument($data, $type)
$id = $data['id'];

$url = $this->solrBaseUrl.'/solr/'.$this->solrClientOptions['collection'].'/update/json/docs';
arSolrPlugin::makeHttpRequest($url, 'POST', json_encode($data));
arSolrPlugin::makeHttpRequest($url, 'POST', json_encode([
$type => $data,
]));

unset($data['id']);
}
Expand Down

0 comments on commit f78050c

Please sign in to comment.