elasticsearch-php | Official PHP client for Elasticsearch | Continuous Deployment library

 by   elastic PHP Version: v8.8.0 License: MIT

kandi X-RAY | elasticsearch-php Summary

kandi X-RAY | elasticsearch-php Summary

elasticsearch-php is a PHP library typically used in Devops, Continuous Deployment, Docker applications. elasticsearch-php has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

[Total Downloads] Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because of this it tries to be opinion-free and very extendable. To maintain consistency across all the low-level clients (Ruby, Python, etc.), clients accept simple associative arrays as parameters. All parameters, from the URI to the document body, are defined in the associative array. Starting from version 7.4.0, all the endpoints (and namespaces) are autogenerated using the [util/GenerateEndpoints.php] script. This script reads the [Elasticsearch API specs] and generates the PHP classes for all the endpoints.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              elasticsearch-php has a medium active ecosystem.
              It has 5139 star(s) with 959 fork(s). There are 444 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 19 open issues and 705 have been closed. On average issues are closed in 351 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of elasticsearch-php is v8.8.0

            kandi-Quality Quality

              elasticsearch-php has 0 bugs and 0 code smells.

            kandi-Security Security

              elasticsearch-php has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              elasticsearch-php code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              elasticsearch-php is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              elasticsearch-php releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              elasticsearch-php saves you 9075 person hours of effort in developing the same functionality from scratch.
              It has 6416 lines of code, 498 functions and 61 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of elasticsearch-php
            Get all kandi verified functions for this library.

            elasticsearch-php Key Features

            No Key Features are available at this moment for elasticsearch-php.

            elasticsearch-php Examples and Code Snippets

            No Code Snippets are available at this moment for elasticsearch-php.

            Community Discussions

            QUESTION

            PHP file_get_contents() is ignoring the request body when making a GET request
            Asked 2021-Mar-12 at 23:03

            I am trying to make a simple HTTP GET request to query Elasticsearch. The Elasticsearch syntax allow the use of a request body in a GET request to add addition query options. I am using the PHP function file_get_contents() to make the GET request.

            The problem is that file_get_contents() seems to be ignoring the body of the request when making a GET request yet it works fine when using a POST request instead.

            How can I get file_get_contents() to process the body of the GET request correctly? The code I am using is shown below.

            Note that :

            • I want to use file_get_contents() to do this, NOT php cURL, php Request2, or the elasticsearch-php library
            • I would like to keep this as a GET request, changing it to a POST request instead is not what I am after

            Thanks in advance!

            ...

            ANSWER

            Answered 2021-Mar-12 at 21:38

            Does it work, if you use http instead of https as key name in $context?

            Source https://stackoverflow.com/questions/66607500

            QUESTION

            ElasticSearch and Laravel can't be friends(Error: No alive nodes found in your cluster )
            Asked 2021-Feb-07 at 05:47

            I have a Docker container with ElasticSearch and when I go to localhost: 9200 I see the following

            ...

            ANSWER

            Answered 2021-Feb-07 at 05:47

            This issue is due to running docker containers, which have their own networs. Localhost would not work and instead you should create a network which both the conatiner should use, that way lavarel container would be able to connect to ES conatiner.

            Source https://stackoverflow.com/questions/66080572

            QUESTION

            Elasticsearch for uncertain amount i18n
            Asked 2020-Aug-09 at 09:17

            I am using elasticsearch-php in a laravel project.

            I have a products table like below

            ...

            ANSWER

            Answered 2020-Aug-09 at 09:17

            I can see you have the language identifier in your database as en-us, zh-cn which means before storing the title, you know the language of product, than you can simply use the multi-field and can add a new language sub-field for all the available languages in Elasticsearch.

            You can have a look at all the current supported languages in Elasticsearch and add all the sub-fields in beginning or change the mapping and add a new language sub-field as you get it in your system.

            Source https://stackoverflow.com/questions/63324483

            QUESTION

            Elasticsearch-php queries
            Asked 2020-Mar-04 at 10:44

            Does anyone know a good resource with elasticsearch-php examples ideally covering queries taking MySQL Examples. I am struggling both with the code syntax and what to use when.

            For example, I want to do a search where $name must be part of field 'business' and where 'country' matches $country

            ...

            ANSWER

            Answered 2020-Mar-04 at 10:44

            You can only have a single must in a bool query, then all must constraints must be elements of the must array. Try like this instead:

            Source https://stackoverflow.com/questions/60522280

            QUESTION

            laravel 6 + elasticsearch-php 7.6 + xampp: No alive nodes found in your cluster
            Asked 2020-Mar-02 at 11:31

            I use elasticsearch-php in my laravel app with XAMPP.

            Versions:

            • PHP: 7.3
            • Laravel: ^6.2
            • Elasticsearch: ^7.6

            AppServiceProvider.php code where I register my custom scout driver:

            ...

            ANSWER

            Answered 2020-Mar-02 at 11:31

            First of all, DON’T PANIC :) I think what you don't have Elasticsearch installed. It will take 5 minutes to install Elasticsearch and solve your problem.

            Installation

            • Download and unpack the Elasticsearch official distribution.
            • Run bin/elasticsearch on Linux or macOS. Run bin\elasticsearch.bat on Windows.
            • Run curl -X GET http://localhost:9200

            Source https://stackoverflow.com/questions/60484170

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install elasticsearch-php

            The recommended method to install Elasticsearch-PHP is through [Composer](http://getcomposer.org). You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at [getcomposer.org](http://getcomposer.org).
            Add elasticsearch/elasticsearch as a dependency in your project’s composer.json file (change version to suit your version of Elasticsearch, for instance for ES 7.0): ```json { "require": { "elasticsearch/elasticsearch": "^7.0" } } ```
            Download and install Composer: ```bash curl -s http://getcomposer.org/installer | php ```
            Install your dependencies: ```bash php composer.phar install ```
            Require Composer’s autoloader Composer also prepares an autoload file that's capable of autoloading all the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process: ```php <?php use Elasticsearch\ClientBuilder; require 'vendor/autoload.php'; $client = ClientBuilder::create()->build(); ```

            Support

            [Full documentation can be found here.](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html) Docs are stored within the repo under /docs/, so if you see a typo or problem, please submit a PR to fix it!. We also provide a code examples generator for PHP using the util/GenerateDocExamples.php script. This command parses the util/alternative_report.spec.json file produced from this [JSON specification](https://raw.githubusercontent.com/elastic/built-docs/master/raw/en/elasticsearch/reference/master/alternatives_report.json) and it generates the PHP examples for each digest value. The examples are stored in asciidoc format under docs/examples folder.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/elastic/elasticsearch-php.git

          • CLI

            gh repo clone elastic/elasticsearch-php

          • sshUrl

            git@github.com:elastic/elasticsearch-php.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link