Download the PHP package toastnz/opensearch without Composer

On this page you can find all versions of the php package toastnz/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 SilverStripe

A wrapper around the OpenSearch PHP client.

Requirements

See the root composer.json.

Installation

Helper Configuration

Configure the helper through Injector properties:

Supported helper properties:

record_operation_fail_silently defaults to true. It only affects automatic record-driven indexing through Toast\OpenSearch\Extensions\DataObjectExtension, where insert, update, delete, publish, and unpublish operations fail quietly if the index is missing, not configured, or unreachable. It does not apply to direct index operations such as OpenSearchManagerTask, OpenSearchReindexTask, initIndex(), clearIndex(), or deleteIndex().

Defining an Index

Create a subclass of Toast\OpenSearch\Search\OpenSearchIndex and override protected properties before calling parent::__construct().

Important: the base constructor only accepts an optional index name. It does not accept named arguments such as fields, searchFields, or filters.

Querying

The second argument can be:

SiteConfig Search Tuning

The bundled SiteConfigExtension adds four CMS tabs under Root.OpenSearch:

When silverstripe/subsites is installed and the active index declares SubsiteID as a filter, the More explanation search automatically scopes results to the current CMS subsite from SubsiteState, while still including records with SubsiteID 0 or no SubsiteID.

FineTune stores non-default values in OpenSearchFineTuneSettings and applies them to generated searches at runtime. The available controls are:

Defaults preserve the module's existing behaviour:

When type is cross_fields, phrase, or phrase_prefix, configured fuzziness is ignored because OpenSearch does not allow that combination.

min_score is only added to generated request bodies when a search term is present or an explicit query option is supplied, so empty filter-only searches continue to behave as they do today.

Synonyms stores rules as related OpenSearchSynonym records on the current SiteConfig and applies them to generated searches at runtime, so changes take effect without reindexing or recreating the index.

In the CMS, editors manage synonyms with a GridField under Root.OpenSearch.Synonyms. Each row has two simple lists:

Search Form

The module ships with:

The controller extension adds SearchForm() and searchResults() to ContentController. The form reads the Search query parameter, runs the helper query, and hydrates matches back into DataObject records when possible.

Search form pagination config:

Tasks

Index manager:

Supported actions:

Full reindex:

Notes


All versions of opensearch with dependencies

PHP Build Version
Package Version
Requires silverstripe/cms Version ^6
silverstripe/framework Version ^6
opensearch-project/opensearch-php Version ^2.5
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 toastnz/opensearch contains the following files

Loading the files please wait ...