Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 10:58
    lexilya starred ruflin/Elastica
  • Jan 31 2019 02:14
    AlvarezCasarez starred ruflin/Elastica
  • Jan 30 2019 08:51
    massimilianobraglia commented #1579
  • Jan 30 2019 08:00
    ruflin commented #1597
  • Jan 30 2019 08:00
    ruflin commented #1601
  • Jan 30 2019 07:40
    ruflin commented #1579
  • Jan 29 2019 23:44
    Renrhaf starred ruflin/Elastica
  • Jan 29 2019 18:23
    EliuFlorez commented #1601
  • Jan 29 2019 14:39
  • Jan 29 2019 14:07
    p365labs commented #1579
  • Jan 29 2019 13:58
    Guernouille starred ruflin/Elastica
  • Jan 29 2019 13:11
    massimilianobraglia commented #1579
  • Jan 29 2019 12:09
    ruflin commented #1579
  • Jan 29 2019 10:36
    p365labs commented #1579
  • Jan 29 2019 09:59
    ruflin commented #1601
  • Jan 29 2019 09:54
    thePanz commented #1601
  • Jan 29 2019 09:44

    ruflin on gh-pages

    Site updated at 2019-01-29 09:4… (compare)

  • Jan 29 2019 09:38

    ruflin on 6.1.1

    (compare)

  • Jan 29 2019 09:38

    ruflin on release-6.1.1

    (compare)

  • Jan 29 2019 09:38

    ruflin on master

    Prepare release 6.1.1 (#1602) (compare)

Moises Gallego
@mgallego
Hi, I'm working in modify the code of 3.x version to work with PHP7.2. But I have errors in test, without code modifications. I clone the repo, go to 3.x branch and execute make tests, and get some errors and failures in tests
for example: 1) Elastica\Test\Query\MatchAllTest::testMatchAllIndicesTypes
Elastica\Exception\ResponseException: all shards failed
Does anyone know what it could be?
Oleksandr Savchenko
@osavchenko
@mgallego hello! actually all tests are passing on php 7.2. you can check builds here https://travis-ci.org/ruflin/Elastica/builds/465984009?utm_source=github_status&utm_medium=notification (it's for one of pull requests)
Moises Gallego
@mgallego
but I'm working on 3.x branch
with old code
Oleksandr Savchenko
@osavchenko
ah
Stas Pochepko
@DJZT
Hi, everyone.

Please, help me with my exception

`Error: Method Nanobe\Nobe\Nobe::__toString() must not throw an exception, caught Elastica\Exception\Bulk\ResponseException: Error in one or more bulk request actions:

update: /my_replaced_index/my_replaced_type/e2b116bc-c5f1-4a15-8578-e02da871f924 caused blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];`

How i can resolve this issue? I did not get information in official repository about blockers. A tried use this curl -XPUT -H "Content-Type: application/json" http://elastic:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}' but it did not get affect.
tacman
@tacman
make sure you have LOTS of disk space. Much more than you think you need.
ArFeRR
@ArFeRR

Hello, I have a question.

Will the ruflin/elastica package support for elasticsearch sql? https://www.elastic.co/guide/en/elasticsearch/reference/6.4/sql-getting-started.html
A year passed since it become free to use, but I can't find it in the lib...

tacman
@tacman
The Bonsai ElasticSearch runs on port 443, but I get an SSL error when trying to connect. I'm using FOSElasticaBundle, but can't see any configuration options there that allow for SSL. Any suggestions? Is there something else I can configure?
Mateng
@localhorst
Hello, is it possible to install Elastica 7 via Composer? If so, how?
Mateng
@localhorst
@localhorst I found out how, by using the Github repository in composer with version dev-master:
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/ruflin/Elastica"
    }
  ],
  "name": "ppw/ppw-search",
  "license": "proprietary",
  "minimum-stability": "dev",
  "prefer-stable": true,
  "require": {
    "ruflin/elastica": "dev-master"
  }
}
John Doe
@JohnDoe89195657_twitter

I have a project where I already updated the mapping definitions of our indices to be Elasticsearch 7 compabible, i.e. to omit mapping types. Elastica seems to force the parameter include_type_name for index creation, which forces the mapping definition to contain a mapping type.

See lib/Elastica/Index.php:

public function requestEndpoint(AbstractEndpoint $endpoint)
{
    $cloned = clone $endpoint;

    $cloned->setIndex($this->getName());
    if ($endpoint instanceof Create || $endpoint instanceof \Elasticsearch\Endpoints\Indices\Mapping\Put) {
        $cloned->setParams(['include_type_name' => true]);
    }

    return $this->getClient()->requestEndpoint($cloned);
}

Will this stay for Elastica 7? Is there another way of creating indices, which are already Elasticserach 8 compatible?

Igor Nóbrega
@igordrnobrega
Good evening guys. I'm updating a project dependencies and I got something weird using 6.1.1 with symfony/monolog-bundle 3.4.0. Now I've this [2019-09-03 18:14:40] app.DEBUG: Elastica Request log and seems to be in loop cause it's getting bigger and bigger untill it breaks the app. Is there a way to disabled this Elastica logs?
An example:
[2019-09-03 18:14:41] app.DEBUG: Elastica Request {"request":{"path":"_bulk","method":"POST","data":"{\"index\":{\"_index\":\"monolog-2019.09.03\",\"_type\":\"record\"}}\n{\"message\":\"Elastica Request\",\"context\":{\"request\":{\"path\":\"_bulk\",\"method\":\"POST\",\"data\":\"{\\"index\\":{\\"_index\\":\\"monolog-2019.09.03\\",\\"_type\\":\\"record\\"}}\n{\\"message\\":\\"Elastica Request\\",\\"context\\":{\\"request\\":{\\"path\\":\\"_bulk\\",\\"method\\":\\"POST\\",\\"data\\":\\"{\\\\"index\\\\":{\\\\"_index\\\\":\\\\"monolog-2019.09.03\\\\",\\\\"_type\\\\":\\\\"record\\\\"}}\\n{\\\\"message\\\\":\\\\"Elastica Request\\\\",\\\\"context\\\\":{\\\\"request\\\\":{\\\\"path\\\\":\\\\"_bulk\\\\",\\\\"method\\\\":\\\\"POST\\\\",\\\\"data\\\\":\\\\"{\\\\\\\\"index\\\\\\\\":{\\\\\\\\"_index\\\\\\\\":\\\\\\\\"monolog-2019.09.03\\\\\\\\"
Fritz Meissner
@iftheshoefritz
hi folks. Elastic theory question here: do I need one index per type of data that I want to query?

like if I denormalise a relational DB with products that belong to product types so my index docs look like this:

product1 type1
product2 type1
product3 type2
product4 type3

obviously this index can answer queries about products, but can it also answer queries about types?

Renan
@renanbr
Hello there! Is there a planning to release a version compatible with ES 7 ?
netwons
@netwons
this error in elastic @ruflin @p365labs
The Response content must be a string or object implementing __toString(), "object" given.
netwons
@netwons

Elastica

ant1234
@ant1234
Hi Folks,
Is there a command to index all once? I've got Elastica powered by heyday/silverstripe-elastica for SilverStripe projects up and running and can ingest data into ElasticSearch after a Publish however can't find a facility to index all of my configured dataobjects once to essentially get the entire database rather than just after saving individual records
Alexander
@byhaskell
http://prntscr.com/q8nfdl
Hello, how can I fix this?
man92-dev
@man92-dev
What is the step to install ruflin/elastica using composer
Michael J Burling
@mjburling
Hello friends. Just curious about the AWS Elasticsearch Service support in Elastica. I'm using commercial SugarCRM software that uses Elastica and it seems to work just fine AWS ES Service when the protocol is http, but https doesn't appear to work. Errors coming through are displaying the search domain with port 80, so it seems that they aren't wrapping the library correctly. I opened a support ticket with them and they're telling me that it it's not their system. Erroneously, they're attributing Elastica's AwsAuthV4 to AWS engineering and if there are errors with it, that it goes beyond the scope of their application, so, it's my problem. I'm not even sure where to begin here.
Maybe if I start with a toy example connecting to an AWS ES service, that would be enough to show them that it ain't Elastica.
Daniel
@danielnegoita
Hello all. Does anyone know about any issues about ES index not being updated on bulk update? I have a project in Symfony 4.2 with FOSElasticBundle 6.0.x-dev and when I do a bulk update and flush the data, the ES index is not getting updated. Could be that the Doctine listener is doesn;t get triggered ?
jzhu-sugar
@jzhu-sugar
Here, what's the plan for 7.0.0 release? I'd like to get the date so we can plan ahead. Thanks
Vincent Le Jeune
@vinzlj

hey guys, I'm wondering if there's a good reason for this:

class ResponseSet {
    ...
    public function __construct(BaseResponse $response, array $bulkResponses)
    {
        parent::__construct($response->getData()); // here we don't pass the $response->getStatus() as a second parameter

        $this->_bulkResponses = $bulkResponses;
    }

I'm using the Bulk API and the response data & status code get erased by the method _processResponse.

Any ideas? Couldn't find issue / PR about this apart from this ruflin/Elastica#1737
Which is exactly my case.

Thanks!

Vincent Le Jeune
@vinzlj

Here's the Response I get from the Client:

Elastica\Response {#35023
  #_queryTime: 0.00088000297546387
  #_responseString: ""
  #_transferInfo: array:26 [
    "url" => "http://127.0.0.1:9200/_bulk?filter_path=-took%2C-items"
    "content_type" => null
    "http_code" => 413
    "header_size" => 60
    "request_size" => 201
    "filetime" => -1
    "ssl_verify_result" => 0
    "redirect_count" => 0
    "total_time" => 0.000824
    "namelookup_time" => 5.3E-5
    "connect_time" => 0.000235
    "pretransfer_time" => 0.000276
    "size_upload" => 0.0
    "size_download" => 0.0
    "speed_download" => 0.0
    "speed_upload" => 0.0
    "download_content_length" => 0.0
    "upload_content_length" => 3462417.0
    "starttransfer_time" => 0.000815
    "redirect_time" => 0.0
    "redirect_url" => ""
    "primary_ip" => "127.0.0.1"
    "certinfo" => []
    "primary_port" => 9200
    "local_ip" => "127.0.0.1"
    "local_port" => 55295
  ]
  #_response: []
  #_status: 413
  #_jsonBigintConversion: false
}

And the ResponseSet I get from the Bulk->send()->_processResponse():

Elastica\Bulk\ResponseSet {#35045
  #_bulkResponses: []
  #_position: 0
  #_queryTime: null
  #_responseString: ""
  #_transferInfo: []
  #_response: []
  #_status: null
  #_jsonBigintConversion: false
}
Khairi Husseini
@khusseini
@vinzlj , I think the best option you have now is to fork the project and set the response in ResponseSet and see if it changes anything for you. Once done you could also open a PR. But that involves some time to put into and as long as no one knows why the response has been omitted in Bulk API, it will be shooting in the dark and maybe killing a baby or something
Vincent Le Jeune
@vinzlj
haha thanks, I've corrected what I needed, I'm gonna open a PR after checking the tests.
I'm using version 6.x, should I do it on master and 6.x ?
Khairi Husseini
@khusseini
that I don't know. I didn't contribute (yet) to the project. I guess @ruflin will guide you once you open the PR
Vincent Le Jeune
@vinzlj
ok thanks ;)
Vincent Le Jeune
@vinzlj
ok here we are : ruflin/Elastica#1775 @ruflin if you've got some time :)
Vincent Le Jeune
@vinzlj
and on master : ruflin/Elastica#1776
Florian Krämer
@burzum
Can anyone please help me with this query? I'm not sure what I'm doing wrong... https://stackoverflow.com/questions/61658459/elastic-search-elasica-php-or-query-on-field-containing-null-not-working
FilipDeJonghe
@FilipDeJonghe
What's the plan for 7.0.0 release? I'm working in a banking environment and we should connect to ES 7.x and we are not allowed to use a beta version in production.
Nicolas Ruflin
@ruflin
@FilipDeJonghe I just pushed 7.0.0 a few days ago. Hope this helps.
FilipDeJonghe
@FilipDeJonghe
@ruflin : Thank you for the good news!
fahde-sorgho
@fahde-sorgho
Hi, i'm a noob with this bundle, i'm defining my fields with yaml like user: *type_text company: *type_text trip: *type_text and it can happend that one field is null and i want to put it optionnal on the mapper
Khairi Husseini
@khusseini
@ruflin thank you
Christian Vermeulen
@ChristianVermeulen

Hey all, I've set up an ES single node with docker for local development. I'm simply trying to store a document but somehow the data (_source) is not saved to ES. I'm on the 7.0.0 branch (es v7.9) and I have succesfully put my mapping in es.

This is what I'm trying to do:

        $id = '5d66d711-a4f6-492f-9823-06a03bd602b9';
        $document = new Document(
            $id,
            ['foo' => 'bar']
        );

        dump($document->toArray());

        $this->index->addDocument($document);
        $this->index->forcemerge();
        $this->index->refresh();

        $doc = $this->index->getDocument($document->getId());
        dump($doc);

Which results in:

^ array:3 [
  "_id" => "5d66d711-a4f6-492f-9823-06a03bd602b9"
  "_index" => ""
  "_source" => array:1 [
    "foo" => "bar"
  ]
]
^ Elastica\Document^ {#2172
  #_data: []
  #_docAsUpsert: false
  #_autoPopulate: false
  #_upsert: null
  #_params: array:3 [
    "_id" => "5d66d711-a4f6-492f-9823-06a03bd602b9"
    "_index" => "account_management"
    "version" => 1
  ]
  #_rawParams: []
}

As you can see, the document does have the data in _source but once the document is retrieved from es it has no data anymore.... What am I missing here?

btw, the forcemerge and refresh were added to try and make it work, that was not there initially..
Thibaut
@ThibautSF
Hi, is there any suggested or built-in way to check if an elasticsearch instance is up with Elastica (and avoid generating errors 500) ?
Thibaut
@ThibautSF
My solution for now
try {
    $client->request('/');
} catch (ClientException | ConnectionException $e) {
    // Log or show error
    exit;
}