Download the PHP package jorgeanzola/craft-scout without Composer

On this page you can find all versions of the php package jorgeanzola/craft-scout. 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 craft-scout

Latest Version Quality Score StyleCI Total Downloads

Scout plugin for Craft CMS 3

Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indexes in sync with your entries.

Support Open Source. Buy beer.

This plugin is licensed under a MIT license, which means that it's completely free open source software, and you can use it for whatever and however you wish. If you're using it and want to support the development, buy me a beer over at Beerpay!

Beerpay

Requirements

This plugin requires Craft CMS 3.0.0-RC1 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

    cd /path/to/project
  2. Then tell Composer to load the plugin:

    composer require rias/craft-scout
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Scout.

Setup

To define your indices, create a new scout.php file within your config folder. This file should return an array with 3 keys, an application_id, your admin_api_key (which are both found in your Algolia account) and a mappings key, which defines your site's mappings.

Within the mappings array, each index is represented by a configuration array.

The Sync option

This config variable determines if Scout should keep your entries in sync automatically. Setting this to false disables all of Scout's event listeners.

Mapping configuration settings

indexName

The index name in Algolia, if you don't already have an index created, Scout will create one for you.

elementType

The element type that this index contains, most of the time this will be craft\elements\Entry::class

Craft's default element type classes are:

criteria

An array of parameters that should be set on the Element Query that limits which entries go inside the index. These criteria are also used when importing through the console command.

transformer

The transformer that should be used to define the data that should be sent to Algolia for each element. If you don’t set this, the default transformer will be used, which includes all of the element’s direct attribute values, but no custom field values.

Your custom transformer class would look something like this:

splitElementIndex

For long documents it is advised to divide the element into multiple rows to keep each row within row data size. This can be done using splitElementIndex. Array items are array indexes returned from the transformer.

Important - distinctId (available after indexing) must be set up as an attribute for faceting for deletion of objects to work when using splitElementIndex.

Console commands

Scout provides two easy console commands for managing your indices.

Importing

To import one or all indices you can run the following console command

The indexName argument is not required, all your mappings will be imported when you omit it.

Flushing/Clearing

Clearing an index is as easy as running a command in your console.

As with the import command, indexName is not required, when flushing Scout will ask you to confirm that you really want to clear all the data in your index.

Credits

Brought to you by Rias


All versions of craft-scout with dependencies

PHP Build Version
Package Version
Requires craftcms/cms Version ^3.0.0-RC1
algolia/algoliasearch-client-php Version ^1.23
league/fractal Version ^0.16.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 jorgeanzola/craft-scout contains the following files

Loading the files please wait ....