Download the PHP package ernestdefoe/opensearch without Composer

On this page you can find all versions of the php package ernestdefoe/opensearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package opensearch

OpenSearch for Flarum

Latest Stable Version Total Downloads

A search driver for Flarum 2 backed by OpenSearch — or Elasticsearch, which speaks the same REST API for everything used here.

Flarum's built-in search is a LIKE scan of the database. It works, and on a small forum you will never notice anything else. It also cannot rank, cannot tolerate a typo, and gets slower with every discussion you add. This routes text searches to a real search engine instead, and leaves everything else exactly as it was.

What it does

What it does not do

It never decides who can see what. Flarum applies whereVisibleTo to every search before results are returned, so the cluster only ranks candidates the member could already read. A stale or over-broad index cannot leak a private discussion.

It also does not replace filtering or browsing. Core routes only text searches to a driver; sorting a tag by newest never touches the cluster.

Installation

Then, under Admin → OpenSearch:

  1. Enter your cluster URL (https://localhost:9200), plus a username and password if your cluster requires them.
  2. Press Test connection — it names the distribution and version it reached, so you know it is the cluster you meant.
  3. Press Rebuild index, or run it from the CLI (see below).
  4. Turn on the searches you want OpenSearch to answer.

Do step 3 before step 4. Enabling the driver against an empty index means every search returns nothing.

Keeping the index current

Flarum hands indexing work to its queue. On the default sync queue that runs inline and there is nothing to configure. If you have set queue_driver to Redis or the database — which most forums of any size have — those jobs only run when a queue worker is running:

Without one, new and edited posts are queued but never indexed, and search quietly serves stale results. This is core Flarum behaviour and applies to every search driver, but it is worth stating plainly, because nothing warns you.

Rebuilding from the CLI

The admin button queues a job; on the default sync queue that still runs inside a web request, which will time out on a large forum. Prefer the command:

--flush deletes the indexes without rebuilding them — useful when you are turning the extension off, or starting clean.

A note on TLS

Verify the TLS certificate is on by default and should stay on for any cluster reached over the public internet. Turn it off only for a cluster on a private or container network using a self-signed certificate, which is the common self-hosted case.

Requirements

No PHP client library is required — the extension talks to the cluster's REST API directly.

Links

License

MIT — Ernest Defoe


All versions of opensearch with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
flarum/core Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ernestdefoe/opensearch contains the following files

Loading the files please wait ...