ruflin on gh-pages
Site updated at 2019-01-29 09:4… (compare)
ruflin on 6.1.1
ruflin on release-6.1.1
ruflin on master
Prepare release 6.1.1 (#1602) (compare)
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)];`
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.
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...
{
"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"
}
}
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?
[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?
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?
The Response content must be a string or object implementing __toString(), "object" given.
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!
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
}
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
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?
Hey Folks
Need some support about the lib
When I make an update request $response = $index->updateDocument($index->createDocument($recordedIndex->getIndexId(), $message->getMedicineSerialized()));
it fails with an error
"[1:8] [UpdateRequest] doc doesn't support values of type: VALUE_STRING"
But when I create the doc with the same data it works fine: $response = $index->addDocument($index->createDocument('', $message->getMedicineSerialized()));