Download the PHP package ccennis/larelastic without Composer

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

larelastic

An indexing and querying package to create, maintain and search an elastic instance with Laravel Scout as backbone.

Contents

Installation

Laravel

Add the Third Party Service Providers in config/app.php
Add the Third Party Aliases in config/app.php
Get Config Files
Add the following variables to your .env file

``

Indexing

(for a completely new installation -- skip ahead past 3rd step if index exists)

Since this package relies on the existence of models and index configurators to create, search and maintain indices, you must run the below commands to generate and set up the appropriate objects.

1.) create an indexConfigurator model (in this example, "Tattoo"):

2.) create your searchable Model:

3.) create your Elastic index using model with full path: ## Indexing 4.) add data to your index ### Migrating to new Index This process creates a new index, imports all data from previous to this index, and then links the old index to this new one via an alias ### Update a mapping: ### Update index: ### Drop index: ### Additional Configuration Options: In your designated model, you may want to make use of the method: This will enable you to fine tune the actual query that is sent to elastic if you need to eager load or specify relationships. ## Usage and Examples Where/OrWhere queries make use of the [bool](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html) methods (`must`, `must_not`, and `should`). Syntax is meant to be eloquent-like, but must use the `search` trait to differentiate it from actual Eloquent. ### Valid Operators Operator | Function | Usage ---------| ---------|-------- = | equals | ->where('col', '=', 'value')
->where('col', 'value') <> | not equals | ->where('col', '<>', 'value') in | in field array | ->where('col', 'in', ['value']) begins_with| search phrase beginning matched to search | ->where('col', 'begins_with', 'value') ends_with | search phrase ending matched to search | ->where('col', 'ends_with', 'value') contains | search phrase found in field | ->where('col', 'contains', 'value') gte | >= | ->where('col', 'gte', 'value') lte | <= | ->where('col', 'lte', 'value') gt | > | ->where('col', 'gt', 'value') lt | < | ->where('col', 'lt', 'value') between | date found between two dates | ->where('col', 'between', ['value1', 'value2']) exists | the value is not null and is found in index | ->where('col', 'exists') #### Sample `Where` query Both of the above queries are valid. Default operator is '=' unless provided. #### Sample `Or Where` query takes two arrays, makes use of the `should` bool operator from Elastic. Evaluates to "find this OR that". Closure, makes use of multiple groupings under `should` bool operator from Elastic. Evaluates to "find (this AND that) OR (this and that)". #### Sample `Multimatch` query This makes use of the [multimatch](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html) elastic function, takes an array of fields. Default search type is [phrase prefix](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#type-phrase), but accepts an argument to override, such as [best_fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#type-best-fields): #### Pagination Pagination functions much the same as in eloquent. It will wrap your response in the Paginator Length Aware metadata fields: #### Sorting Simple Sorting: Sorting defaults to asc and can be stacked for multiple sorts. If you need to specify a field_type for the sort field (i.e. 'keyword' or 'raw') you can include it as a param: The above may be necessary in the event you are already querying a nested object and want to ensure the datatype is listed separately. #### Geosorting Sorting by distance based on latitude and longitude. Sample query in Elastic: In order to use this in the package, you can use the following syntax: There is also support to return the distance query as raw syntax, which can be used in the Top Level OR statement. An example: Valid fields to pass in the data array are above in the elastic query. Valid arguments for unit include: mi (miles), in (inches), yd (yards), km (kilometers), cm (centimeters), mm (millimeters). There are two distance calculation modes: arc (the default), and plane. The arc calculation is the most accurate. initial support for aggs takes a column name and creates buckets to count all matches. result set will be under an "aggs" object, like so:

All versions of larelastic with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/scout Version ^8.0|^9.0
elasticsearch/elasticsearch Version ^7.16
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 ccennis/larelastic contains the following files

Loading the files please wait ....