M Sh
M Sh

Reputation: 439

Solarium execute custom query

How can I execute query /solr/<core>/schema/fields or any direct uri in Solarium? I found some codes but I don't know how to use them:

$request = $client->createRequest($query);
$response = $client->executeRequest($request);
$result = $client->createResult($query, $response);

Upvotes: 1

Views: 200

Answers (1)

Florian Semm
Florian Semm

Reputation: 131

You can use file_get_contents('/your/endpoint') to query a solr-uri. If you need to do POST to an endpoint you Guzzle.

Upvotes: 0

Related Questions