elasticsearch-plugin

Can not get result of “script_fields” in elasticsearch

不想你离开。 提交于 2019-12-12 04:56:06
问题 I am trying to use "script_fields" in order to set new values to my fields but I can not see the "field" that I have added on result set,{ "query": { "my_type_x": xxx }, "script_fields": { "test1": { "script": "doc['my_type'].value * 3" } } } Once I launch this on elasticsearch I get no error and get the results without any problem but I can not see any "test1" with changed value. Where do I need to review ? Can you please tell me if anything is wrong ? Thank you 回答1: My problem was coming

elastic search 5.1.1 unable to install elasticsearch-head?

随声附和 提交于 2019-12-12 04:36:20
问题 I've just install latest elasticseach on my mac using brew install elasticsearch , and it can run and I can see contents from localhost:9200 . But I tried to install web-browser for it. So the stack over flow says there's a "plugin" command under elasticsearch/bin folder. But seems this is an answer for very old version of Elasticsearch. Now there's only one /usr/local/Cellar/elasticsearch/5.1.1/libexec/bin/elasticsearch-plugin , and I failed to: elasticsearch-plugin install mobz

Set index.query.default_field using NEST Client c#

时光总嘲笑我的痴心妄想 提交于 2019-12-12 03:44:42
问题 I need to set index.query.default_field while creating index.How can I do it using Nest client c#. Added my create index code.Where do I set default_field property? var fullNameFilters = new List<string> { "lowercase", "snowball" }; client.CreateIndex("mydocs", c => c .Settings(st => st .Analysis(anl => anl .Analyzers(h => h .Custom("full", ff => ff .Filters(fullNameFilters) .Tokenizer("standard")) ) .TokenFilters(ba => ba .Snowball("snowball", sn => sn .Language(SnowballLanguage.English))) )

searchguard for SSL communication in ELK

心已入冬 提交于 2019-12-11 17:19:08
问题 Basic username/password authentication for ELK, i was able to achieve using searchguard on windows platform. Now i am trying to establish secure communication. I have performed the following changes, In elasticsearch.yml searchguard.ssl.http.enabled: true searchguard.ssl.http.keystore_filepath: D:\Softwares\ELK\elasticsearch-5.4.0\elasticsearch-5.4.0\config\CN=localhost-keystore.jks searchguard.ssl.http.keystore_password: 221749a2add117cf889f searchguard.ssl.http.truststore_filepath: D:

Why POST and not GET in elasticsearch head UI “any Request”

旧城冷巷雨未停 提交于 2019-12-11 17:03:43
问题 I had a similar problem as asked here. I was running the following query in the head plugin, any request tab (with _search endpoint and GET): { "query": { "match": { "body": "mulla" }}} all my documents were a hit and all had score of 1, with explain saying something like ConstantScore(*:*). In the linked question someone replied that you have to be sure to use POST and not GET, which works as expected (returning a subset of all documents with different scores).Which is my question why POST

How to get array count of nested object in elastic-search

删除回忆录丶 提交于 2019-12-11 14:38:25
问题 Can someone please help me to get an aggregated count of the nested object in elastic search, let say if my elastic search object mapping as : { "employe": { "dynamic": "strict", "properties": { "empId":{ "type": "keyword" }, "entities": { "type": "nested" } } } } entities are the type of array with some other object. I wanted to get the count of entities of the filtered item. I have tried some elastic search query, but it does not work { "query": { "bool": { "filter": [ { "terms": { "empId":

Logstash Elasticsearch Input - runs once only?

六眼飞鱼酱① 提交于 2019-12-11 13:40:13
问题 I'm trying to copy a small subset of data from index A into index B. I have a Logstash config running on an EC2 instance with the Elasticsearch input, some filters and the Elasticsearch output. This works fine the first time I run it, but if any new data is added to Index A (that meets the input's query criteria) the Logstash config doesn't detect it and output it to Index B. This has me thinking, does the Elasticsearch input only run once? Unlike inputs like the file or S3 input that will

How do I group documents in elasticsearch by a single field?

女生的网名这么多〃 提交于 2019-12-11 13:15:10
问题 If I have a bunch of documents in elaticsearch that I want to be returned grouped by the one field of the document, how do I do it? Also I need it to consistently return a fixed number of results (using set maxresults) For example if I have a bunch of documents each document representing a person and fields of the document containing attributes of the person. Let's say each person has a city field in the document. I would like to query Elasticsearch in a way that will return 50 results that

elasticsearch migration plugin: Blank page

﹥>﹥吖頭↗ 提交于 2019-12-11 12:33:05
问题 In order to upgrade our 1.5.2 elasticsearch to 2.x, I have successfully installed elasticsearch migration plugin v1.18, but when linking to http://localhost:9200/_plugin/migration/ I get a blank page. Also the next command gives me nothing: ~/bin/elasticsearch-1.5.2$ curl -XGET http://localhost:9200/_plugin/migration/ What am I missing? 回答1: Did you install the plugin as root? Check the permissions of /usr/share/elasticsearch/plugins/migration. Your default umask may prevent the elasticsearch

Get document on some condition in elastic search java API

£可爱£侵袭症+ 提交于 2019-12-11 02:39:28
问题 As I know we can parse document in elastic search, And when we search for a keyword, It will return the document using this code of java API:- org.elasticsearch.action.search.SearchResponse searchHits = node.client() .prepareSearch() .setIndices("indices") .setQuery(qb) .setFrom(0).setSize(1000) .addHighlightedField("file.filename") .addHighlightedField("content") .addHighlightedField("meta.title") .setHighlighterPreTags("<span class='badge badge-info'>") .setHighlighterPostTags("</span>")