Download the PHP package silverstripe-terraformers/app-search-php-8 without Composer

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

⚠️ This client is abandoned ⚠️

This package is here purely to serve the Elastic App Search with PHP 8 as an allowed platform requirement

All credit and praise goes to the contributors of Elastic App Search

As of Enterprise Search version 7.13.0, we are directing users to the new Enterprise Search PHP Client and deprecating this client.

This client will be compatible with all Enterprise Search 7.x releases, but will not be compatible with 8.x releases. Our development effort on this project will be limited to bug fixes. All future enhancements will be focused on the Enterprise Search PHP Client.

Thank you! - Elastic

Elastic App Search Logo

CircleCI buidl

A first-party PHP client for building excellent, relevant search experiences with Elastic App Search.

Contents


Getting started 🐣

Using this client assumes that you have already an instance of Elastic App Search up and running.

You can find more information about Elastic App Search at : https://www.elastic.co/app-search.

You can install the client in your project by using composer:

Versioning

This client is versioned and released alongside App Search.

To guarantee compatibility, use the most recent version of this library within the major version of the corresponding App Search implementation.

For example, for App Search 7.3, use 7.3 of this library or above, but not 8.0.

If you are using the SaaS version available on swiftype.com of App Search, you should use the version 7.5.x of the client.

Usage

Configuring the client

Basic client instantiation

To instantiate a new client you can use \Elastic\AppSearch\Client\ClientBuilder:

Notes:

Basic usage

Retrieve or create an engine

Most methods of the API require that you have access to an Engine.

To check if an Engine exists and retrieve its configuration, you can use the Client::getEngine method :

If the Engine does not exists yet, you can create it by using the Client::createEngine method :

The second parameter ($language) is optional. Set it to null to apply the universal language.

Read more about language support.

Index some documents

You can use the Client::indexDocuments method to index some documents into the Engine:

The $indexingResults array will contain the result of the indexation of each documents. You should always check the content of the result.

Read more about document indexing.

Search

You can use the Client::search method to search in your Engine:

If you want to match all documents you can use and empty search query '' as second parameter ($queryText).

The $searchRequestParams parameter is optional and can be used to use advanced search features. Allowed params are :

Param name Documentation URL
page https://swiftype.com/documentation/app-search/api/search#paging
filters https://swiftype.com/documentation/app-search/api/search/filters
facets https://swiftype.com/documentation/app-search/api/search/facets
sort https://swiftype.com/documentation/app-search/api/search/sorting
boosts https://swiftype.com/documentation/app-search/api/search/boosts
search_fields https://swiftype.com/documentation/app-search/api/search/search-fields
result_fields https://swiftype.com/documentation/app-search/api/search/result-fields
group https://swiftype.com/documentation/app-search/api/search/grouping

The search response will contains at least a meta field and a results field as shown in this example:

Clients methods

Method Description Documentation
createEngine Creates a new engine.

Parameters :
- $name (required)
- $language
Endpoint Documentation
createMetaEngine Creates a new meta engine.

Parameters :
- $name (required)
- $sourceEngines (required)
Endpoint Documentation
addMetaEngineSource Add a source engine to an existing meta engine.

Parameters :
- $engineName (required)
- $sourceEngines (required)
Endpoint Documentation
createCuration Create a new curation.

Parameters :
- $engineName (required)
- $queries (required)
- $promotedDocIds
- $hiddenDocIds
Endpoint Documentation
createSynonymSet Create a new synonym set.

Parameters :
- $engineName (required)
- $synonyms (required)
Endpoint Documentation
deleteCuration Delete a curation by id.

Parameters :
- $engineName (required)
- $curationId (required)
Endpoint Documentation
deleteDocuments Delete documents by id.

Parameters :
- $engineName (required)
- $documentIds (required)
Endpoint Documentation
deleteEngine Delete an engine by name.

Parameters :
- $engineName (required)
Endpoint Documentation
deleteMetaEngineSource Delete a source engine from a meta engine.

Parameters :
- $engineName (required)
- $sourceEngines (required)
Endpoint Documentation
deleteSynonymSet Delete a synonym set by id.

Parameters :
- $engineName (required)
- $synonymSetId (required)
Endpoint Documentation
getApiLogs The API Log displays API request and response data at the Engine level.

Parameters :
- $engineName (required)
- $fromDate (required)
- $toDate (required)
- $currentPage
- $pageSize
- $query
- $httpStatusFilter
- $httpMethodFilter
- $sortDirection
Endpoint Documentation
getCountAnalytics Returns the number of clicks and total number of queries over a period.

Parameters :
- $engineName (required)
- $filters
- $interval
Endpoint Documentation
getCuration Retrieve a curation by id.

Parameters :
- $engineName (required)
- $curationId (required)
Endpoint Documentation
getDocuments Retrieves one or more documents by id.

Parameters :
- $engineName (required)
- $documentIds (required)
Endpoint Documentation
getEngine Retrieves an engine by name.

Parameters :
- $engineName (required)
Endpoint Documentation
getSchema Retrieve current schema for then engine.

Parameters :
- $engineName (required)
Endpoint Documentation
getSearchSettings Retrive current search settings for the engine.

Parameters :
- $engineName (required)
Endpoint Documentation
getSynonymSet Retrieve a synonym set by id.

Parameters :
- $engineName (required)
- $synonymSetId (required)
Endpoint Documentation
getTopClicksAnalytics Returns the number of clicks received by a document in descending order.

Parameters :
- $engineName (required)
- $query
- $pageSize
- $filters
Endpoint Documentation
getTopQueriesAnalytics Returns queries anlaytics by usage count.

Parameters :
- $engineName (required)
- $pageSize
- $filters
Endpoint Documentation
indexDocuments Create or update documents.

Parameters :
- $engineName (required)
- $documents (required)
Endpoint Documentation
listCurations Retrieve available curations for the engine.

Parameters :
- $engineName (required)
- $currentPage
- $pageSize
Endpoint Documentation
listDocuments List all available documents with optional pagination support.

Parameters :
- $engineName (required)
- $currentPage
- $pageSize
Endpoint Documentation
listEngines Retrieves all engines with optional pagination support.

Parameters :
- $currentPage
- $pageSize
Endpoint Documentation
listSynonymSets Retrieve available synonym sets for the engine.

Parameters :
- $engineName (required)
- $currentPage
- $pageSize
Endpoint Documentation
logClickthrough Send data about clicked results.

Parameters :
- $engineName (required)
- $queryText (required)
- $documentId (required)
- $requestId
- $tags
Endpoint Documentation
multiSearch Run several search in the same request.

Parameters :
- $engineName (required)
- $queries (required)
Endpoint Documentation
querySuggestion Provide relevant query suggestions for incomplete queries.

Parameters :
- $engineName (required)
- $query (required)
- $fields
- $size
Endpoint Documentation
resetSearchSettings Reset search settings for the engine.

Parameters :
- $engineName (required)
Endpoint Documentation
search Allows you to search over, facet and filter your data.

Parameters :
- $engineName (required)
- $queryText (required)
- $searchRequestParams
Endpoint Documentation
updateCuration Update an existing curation.

Parameters :
- $engineName (required)
- $curationId (required)
- $queries (required)
- $promotedDocIds
- $hiddenDocIds
Endpoint Documentation
updateDocuments Partial update of documents.

Parameters :
- $engineName (required)
- $documents (required)
Endpoint Documentation
updateSchema Update schema for the current engine.

Parameters :
- $engineName (required)
- $schema (required)
Endpoint Documentation
updateSearchSettings Update search settings for the engine.

Parameters :
- $engineName (required)
- $searchSettings (required)
Endpoint Documentation

Development

Code for the endpoints is generated automatically using a custom version of OpenAPI Generator.

To regenerate endpoints, use the docker laucher packaged in vendor/bin:

The custom generator will be built and launched using the following Open API spec file : resources/api/api-spec.yml.

You can then commit and PR the modified api-spec file and your endpoints code files.

The client class and readme may be changed in some cases. Do not forget to include them in your commit!

FAQ 🔮

Where do I report issues with the client?

If something is not working as expected, please open an issue.

Where can I find the full API documentation ?

Your best bet is to read the documentation.

Where else can I go to get help?

You can checkout the Elastic community discuss forums.

Contribute 🚀

We welcome contributors to the project. Before you begin, a couple notes...

License 📗

Apache 2.0 © Elastic

Thank you to all the contributors!


All versions of app-search-php-8 with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
silverstripe-terraformers/openapi-codegen-php-8 Version ^1.0.5
psr/log Version ^1.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 silverstripe-terraformers/app-search-php-8 contains the following files

Loading the files please wait ....