Delete all documents from index without deleting index

I believe if you combine the delete by query with a match all it should do what you are looking for, something like this (using your example): curl -XDELETE ‘http://localhost:9200/twitter/tweet/_query’ -d ‘{ “query” : { “match_all” : {} } }’ Or you could just delete the type: curl -XDELETE http://localhost:9200/twitter/tweet Note: XDELETE is deprecated for … Read more

Elasticsearch showing received plaintext http traffic on an https channel in console

As @Val has already answered the question above just posting the code new users who wants to disable the SSL. # ——————————————————————————– # Enable security features xpack.security.enabled: false xpack.security.enrollment.enabled: false # Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents xpack.security.http.ssl: enabled: false keystore.path: certs/http.p12 # Enable encryption and mutual authentication … Read more

ElasticSearch get offsets of highlighted snippets

The client-side approach is actually standard practice. We have discussed adding the offsets, but are afraid it would lead to more confusion. The offsets provided are specific to Java’s UTF-16 String encoding, which, while they could technically be used to calculate the fragments from $LANG, it’s way more straightforward to parse the response text for … Read more

Elasticsearch URI based query with AND operator

For URI search in ElasticSearch, you can use either the AND operator profiletype:student AND username:s, as you say but without quotes: _search?q=profiletype:student AND username:s* You can also set the default operator to AND _search?q=profiletype:student username:s*&default_operator=AND Or you can use the + operator for terms that must be present, i.e. one would use +profiletype:student +username:s as … Read more

Remove duplicate documents from a search in Elasticsearch

You could use field collapsing, group the results on the name field and set the size of the top_hits aggregator to 1. /POST http://localhost:9200/test/dedup/_search?search_type=count&pretty=true { “aggs”:{ “dedup” : { “terms”:{ “field”: “name” }, “aggs”:{ “dedup_docs”:{ “top_hits”:{ “size”:1 } } } } } } this returns: { “took” : 192, “timed_out” : false, “_shards” : { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)