Download the PHP package silverstripe/silverstripe-search-sdk without Composer

On this page you can find all versions of the php package silverstripe/silverstripe-search-sdk. 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 silverstripe-search-sdk

🧰 Silverstripe Search SDK

Silverstripe Search is designed to integrate easily with the Silverstripe CMS. This Software Development Kit (SDK) is a one-stop-shop for getting your application integrated.

Tagged dependencies

As part of the Silverstripe Search managed service, we will put the required dependencies (and the explicit versions) through our internal regression testing before adding them to this SDK.

This means that new tags for the SDK will trail tags being made on the upstream dependencies to ensure they are stable and work well with the service.

If you want updates to dependencies faster, then you should define your own requirements for those dependencies with your own version constraints. By doing so, you accept the risks of your defined versioned constraints.

Engine vs Index

[!IMPORTANT] TL;DR:\ For all intents and purposes, "engine" and "index" are synonomous. If we refer to something as "engine", but the Discoverer module is asking for an "index", then you simply need to give it the data you have for your engine.

The Discoverer and Forager modules are built to be service-agnostic; meaning, you can use them with any search provider, as long as there is an adaptor for that service.

When Discoverer refers to an "index", it is talking about the data store used for housing your content. These data stores are known by different names across different search providers. Algolia and Elasticsearch call them "indexes", Typesense calls them "collections", App Search calls them "engines". Discoverer had to call them something in its code, and it chose to call then "indexes"; Silverstripe Search, however, calls them "engines".

Actions apply in the same way to all of the above. In Silverstripe Search, the action of "indexing" is the action of adding data to your engine, where it is said to be "indexed". Updating that data is commonly referred to as "re-indexing".

Setting up

Before you can get stared with this SDK you will need:

Installation

There are 3 core parts to the SDK:

  1. Indexing: Getting your CMS content indexed into the search engine
  2. Querying: Searching the indexed content in your search engine
  3. Search UI: A default implementation of a search results page with basic control over search options, designed to get you up and running quickly if you have basic search requirements

1. Indexing, and 2. Querying are likely to be requirements for most projects, but 3. Search UI potentially isn't. Some reasons why you might not want the Search UI include:

Install the complete SDK run:

Updates

To update the SDK, be sure to include -W / --with-all-dependencies

🛼 Roll-your-own installation

If you want to dial in your installation you can manually add the packages above to your composer.json.

It will be up to you what version constraints you apply, but noting again, only the versions required in this repository have gone through our regression testing process.

Specify environment variables

To integrate with Silverstripe Search, define environment variables containing your endpoint, engine prefix, management API key, and query API key.

[!TIP] For Silverstripe Cloud clients:

  • BIFROST_ENDPOINT and BIFROST_ENGINE_PREFIX should be added as Variables
  • BIFROST_MANAGEMENT_API_KEY and BIFROST_QUERY_API_KEY should be added as Secrets.

Understanding your engine prefix and suffix:

For example:

Engine Engine prefix Engine suffix
search-acmecorp-prod-main search-acmecorp-prod main
search-acmecorp-prod-inc search-acmecorp-prod inc
search-acmecorp-uat-main search-acmecorp-uat main
search-acmecorp-uat-inc search-acmecorp-uat inc

Why?

Because you probably have more than one environment type that you're running search on (e.g. Production and UAT), and (generally speaking) you should have different engines for each of those environments. So, you can't just hardcode the entire engine name into your project, because that code doesn't change between environments.

Whenever you make a query, Forager and Discoverer will ask you for the "index" name; you will actually want to provide only the <suffix>. We will then take BIFROST_ENGINE_PREFIX and your <suffix>, put them together, and that's what will be queried. This allows you to set BIFROST_ENGINE_PREFIX differently for each environment, while having your <suffix> hardcoded in your project.

Indexing your CMS content

Please see the Forager > Bifröst documentation for details on how to get set up with indexing your content.

Get search to your users

You may or may not want to use the Discoverer > Search UI module, if you don't want to use it, then the Discoverer module has quite a bit of documentation regarding how you can get your search form and results in front of your users; including an example SearchResults Page and Controller:

Administrative interface

The Silverstripe Search Dashboard provides an interface for managing feature such as Synonyms, Curations, Analytics and Relevancy Tuning. Refer to the User documentation for more information


All versions of silverstripe-search-sdk with dependencies

PHP Build Version
Package Version
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 silverstripe/silverstripe-search-sdk contains the following files

Loading the files please wait ...