Download the PHP package chenyuanqi/elasticsearch without Composer

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

chenyuanqi/elasticsearch not only for laravel5

This package depends on "elasticsearch/elasticsearch" and it provides a unified API across a variety of different full text search services.

Notice: Test for elasticsearch 2.x, even than 5.x; whatever, some function cannot take effect for the low one.

The following dependencies are needed for the listed search drivers:

Structure

├── Commands
│   └── ElasticsearchService.php
├── config
│   └── elasticsearch.php
├── Analyze.php
├── Builder.php
├── Query.php
├── SearchFacade.php
└── SearchServiceProvider.php

Suggestion

For safety reasons, please install the plugin: shield
For search effectively, these plugins may be useful for you:
1、head
2、bigdesk
3、kopt
4、sql
5、ik
6、pinyin
7、同义词
8、简繁转换

Install

You can edit composer.json file, in the require object:

Or use composer command:

After that, run composer update to install this package.
Actually, it was finished but in laravel5 that you still let the service provider to app/config/app.php, within the providers array.

Add a class alias to app/config/app.php, within the aliases array.

Configure

In laravel5, publish the default config file to your application then make modifications as you can.

However, default config file is config/elasticsearch.php.

Laravel Usage

1、search for create index

Notice: Index name must be lowercase.

2、search for mapping due to config

3、search for select index and type

Notice: Here index and type has default value.

4、search for insert data

5、search for update data

Here provide two way for update data,

By the way, use update by query must open the script setting

6、search for increase or decrease data

Like update by query, increase or decrease also open the script setting

7、search for delete data

Here provide two way for delete data,

8、search for clean index

9、search for bulk

Notice: Default handle is 'index'.

10、everything is for search

You can select fields show for search.

Default paging is true and show the result first ten, If you don't need it

Construct the conditions with queryString, just like that

Or the conditions with filter

Or the conditions with ids

Or the conditions with match

Or the conditions with term

Or the conditions with bool

Or the conditions with null

Or the conditions with aggregation

Or the conditions with range

However, the range query has fourth parameter which use as extra action.
Or the conditions with where query

Here are two ways When we need paging.

And count the record, just use the count function.

At last, use the debug function that output the debug message as you need.

Notice: you must output the message after search.

Others Usage

You know, it uses the facade design pattern above all of laravel usage.
So in here, just replace the Search object like that:

All right, Happy hacking~


All versions of elasticsearch with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
illuminate/support Version ~5.1
elasticsearch/elasticsearch Version ~2.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 chenyuanqi/elasticsearch contains the following files

Loading the files please wait ....