Apache Solr is a HTTP API, as explained here.
To get access to Apache Solr from the php plugin code, we could have developed our own http wrapper, but it would have been foolish.
Instead, we are using the Solarium php Solr client library. It is a neat object oriented code which takes care of wrapping/unwrapping php objects to and from json over http.
If you want to read more, here are some links:
– https://solarium.readthedocs.io/en/stable/
– https://www.solarium-project.org/
– https://github.com/solariumphp/solarium