Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
55 views

JSON encoding complex arrays with json_encode in PHP

I am trying to build up a Elasticsearch query in PHP using arrays and then using the json_encode() function to convert it to JSON, however, there seems to be something Elasticsearch is disliking: ...
ChrisBratherton's user avatar
0 votes
2 answers
343 views

Filter on multi match ES PHP

Starting to work on ES. I would like to be able to make a multi_match with a filter in PHP. I followed the official ES documentation but I don't understand my mistake. Here is the code: public ...
Oliv's user avatar
  • 148
0 votes
1 answer
167 views

Getting a specific data from a json file using php

Hi I have a json file and I want to extract some data from it the file looks like as below: { "took" : 1, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "skipped" ...
Ana's user avatar
  • 29
0 votes
1 answer
302 views

Aggs multiple buckets with nested documents in Elasticsearch

I'm currently working on an Elasticsearch project. I want to aggregate data from our existing documents. The (simplified) structure is as follows: { "products" : { "mappings" : { "...
Petervw's user avatar
  • 49
1 vote
0 answers
545 views

parse error for highlight in elasticsearch

Using Elasticsearch for searching documents and its working fine if i query from Kibana,but if i use SDK for php and then add highlight it give me error like {"error":{"root_cause":[{"type":"...
Muhammad Hashir Anwaar's user avatar
0 votes
1 answer
110 views

Elastic Search Indexing in php

I have a codeigniter application where I try to set up elasticsearch, I have my json which looks like this: { "took": 4, "timed_out": false, "_shards": { "total": 1, "...
Dax 's user avatar
  • 199
0 votes
1 answer
157 views

What is the correct way to apply a sub filter to a term in Elastic search?

I have a query I am trying to fetch results via Elastic Search 6.4.2. It is working. But when I apply the Tags part which should be under the NewsArticle type, it brings back results for the ...
Jay's user avatar
  • 68
1 vote
2 answers
96 views

PHP - getting value from elasticsearch json

I have the following json from elasticsearch: {"took":0,"timed_out":false,"_shards":{"total":6,"successful":6,"skipped":0,"failed":0},"hits":{"total":17441,"max_score":0.0,"hits":[]},"aggregations":{"...
Yagel's user avatar
  • 1,312
0 votes
2 answers
122 views

PHP fails on JSON encoding data from Aurora MySQL

I've recently migrated an application from MySQL to Amazon Aurora MySQL service. My application fetches data from this database and use it to search one of the Elasticsearch index. The underlying ...
J. Doe's user avatar
  • 1
2 votes
0 answers
748 views

Laravel elastic search Update Index

1)My first question is: In Laravel project when I run the command as "PHP artisan elastic:update-index JKIndexConfigurator" It gives error as " Class 'JKIndexConfigurator' not found " though the ...
Bhagyashree Gaikwad's user avatar
16 votes
4 answers
10k views

Elasticsearch partial bulk update

I have 6k of data to update in ElasticSearch. And I have to use PHP. I search in the documentation and I have found this, Bulk Indexing but this is not keeping the previous data. I have structure: [ ...
Jonathan Machado's user avatar
1 vote
1 answer
55 views

Why isn't this urlencode JSON GET request working?

$word = $_GET['search']; $json = json_encode('{"query":{"match":{"name":"'.$word.'"}}}'); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'http://10.128.0.2:9200/testers/test/_search' . urlencode(...
Diz's user avatar
  • 61
0 votes
1 answer
1k views

No handler found for uri [/<url>/<url>] and method [PUT]

I am receiving the No handler found for uri [/<url>/<url>] and method [PUT] error when sending a request via Elasticsearch. I am using POST, not PUT, so I do not need to use _id. Using ...
Tom's user avatar
  • 399
0 votes
0 answers
36 views

elasticsearch geo search with multiple must

I am using elasticsearch with bool/must/filter and in filter using the geo_distance filter. Here are some sample queries: Example 1: curl -XPOST 'localhost:9200/indexname/_search?pretty' -H 'Content-...
Venugopal Ravi's user avatar
2 votes
2 answers
6k views

elasticsearch aggregations on substring

I have a field indexed as String in elasticsearch 5 For example 20090219 , 20100416 etc I can make a aggregation this data, But I want to aggregate on substring. that is on 2009,2010 I don't want ...
sawan mehta's user avatar

15 30 50 per page