elasticsearch-5

Elasticsearch autocomplete suggester

点点圈 提交于 2020-04-07 07:08:18
问题 I want to implement autocomplete feature in ES I have followed this tutorial from ES documentations my Indexing is: { "properties" : { "suggest" : { "type" : "completion" }, "titleKeyword" : { "type": "keyword" } } } } I am putting text value in titleKeyword field then I queried like follows { "suggest" : { "my-suggestion" : { "text" : "iphone", "term" : { "field" : "titleKeyword" } } } } The result is: ... "suggest": { "my-suggestion": [ { "text": "iphone", "offset": 0, "length": 6, "options

Elasticsearch autocomplete suggester

旧时模样 提交于 2020-04-07 07:07:24
问题 I want to implement autocomplete feature in ES I have followed this tutorial from ES documentations my Indexing is: { "properties" : { "suggest" : { "type" : "completion" }, "titleKeyword" : { "type": "keyword" } } } } I am putting text value in titleKeyword field then I queried like follows { "suggest" : { "my-suggestion" : { "text" : "iphone", "term" : { "field" : "titleKeyword" } } } } The result is: ... "suggest": { "my-suggestion": [ { "text": "iphone", "offset": 0, "length": 6, "options

Elasticsearch autocomplete suggester

强颜欢笑 提交于 2020-04-07 07:07:07
问题 I want to implement autocomplete feature in ES I have followed this tutorial from ES documentations my Indexing is: { "properties" : { "suggest" : { "type" : "completion" }, "titleKeyword" : { "type": "keyword" } } } } I am putting text value in titleKeyword field then I queried like follows { "suggest" : { "my-suggestion" : { "text" : "iphone", "term" : { "field" : "titleKeyword" } } } } The result is: ... "suggest": { "my-suggestion": [ { "text": "iphone", "offset": 0, "length": 6, "options

ElasticSearch 5.6 cannot start on Mac OS

我们两清 提交于 2020-03-17 11:31:07
问题 I can't start ElasticSearch 5.6 server on Mac after installing it with Brew. Get this error: $ /usr/local/opt/elasticsearch@5.6/bin/elasticsearch Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource BufferedChecksumIndexInput(SimpleFSIndexInput(path="/usr/local/etc/elasticsearch/elasticsearch.keystore"))): 3 (needs to be between 1 and 2) Likely root cause: org.apache.lucene

Elasticsearch - get count of child docs, even if count is zero

强颜欢笑 提交于 2020-03-03 03:07:47
问题 Objective: execute 1 search against documents of Parent type, and include in the results the count of children for each parent document. (Elasticsearch v5) Data model has 2 document types: Parent and Child. I have found that I can do the following query: GET /stack/parent_doc/_search/ { "query": { "has_child": { "type": "child_doc", "inner_hits": { "_source": false, "size": 0 }, "query": { "match_all": {} } } } } and I get back all parents which have at least one child and their counts of

Elasticsearch - get count of child docs, even if count is zero

杀马特。学长 韩版系。学妹 提交于 2020-03-03 03:07:06
问题 Objective: execute 1 search against documents of Parent type, and include in the results the count of children for each parent document. (Elasticsearch v5) Data model has 2 document types: Parent and Child. I have found that I can do the following query: GET /stack/parent_doc/_search/ { "query": { "has_child": { "type": "child_doc", "inner_hits": { "_source": false, "size": 0 }, "query": { "match_all": {} } } } } and I get back all parents which have at least one child and their counts of

How can I safely move Elasticsearch indices to another mount in Linux?

只愿长相守 提交于 2020-01-17 06:36:10
问题 I'm having a number of indices which are actually causing some space issues at the moment in my Ubuntu machine. The indices keep growing on a daily basis. So I thought of moving it to another mount directory which has more space apparently. How can I do this safely? And I have to make sure that the existing ES indices and the Kibana graphs would be safe enough after the doing the move. What I did : Followed this SO and moved my data directory of Elasticsearch somehow to the directory (/data

Can i store html content of webpage in storm crawler?

眉间皱痕 提交于 2020-01-13 06:57:09
问题 I am using strom-crawler-elastic. I can able to see the fetched urls and status of those. Configuration change in ES_IndexInit.sh file gives only url,title, host, text. But can i store the entire html content with html tags ? 回答1: The ES IndexerBolt gets the content of pages from the ParseFilter but does not do anything with it. One option would be to modify the code so that it pulls the content field from the incoming tuples and indexes it. Alternatively, you could implement a custom

Is it possible to update an existing field in an index through mapping in Elasticsearch?

安稳与你 提交于 2020-01-11 13:17:09
问题 I've already created an index, and it contains data from my MySQL database. I've got few fields which are string in my table, where I need them as different types ( integer & double ) in Elasticsearch . So I'm aware that I could do it through mapping as follows: { "mappings": { "my_type": { "properties": { "userid": { "type": "text", "fielddata": true }, "responsecode": { "type": "integer" }, "chargeamount": { "type": "double" } } } } } But I've tried this when I'm creating the index as a new

Mappings on filed Elastic Search

狂风中的少年 提交于 2020-01-07 02:47:06
问题 I am using elastic search for autocompletion and also to correct spelling mistakes.I have this mapping for my field(for auto-completion). **Mapping:** "name": { "type": "text", "analyzer": "autocomplete" } Now i want to implement phrase suggester on this field.When i use this it is giving wrong result.Thats because of existing mapping i think. **POST XYZ/_search** { "suggest": { "text": "ipone 16", "simple_phrase": { "phrase": { "field": "name", "highlight": { "pre_tag": "<em>", "post_tag": "