ElasticSearch

Getting an ElasticSearch Cluster to Green (Cluster Setup on OS X)

点点圈 提交于 2021-02-05 13:55:09
问题 I have installed ElasticSearch on Mac OS X using Homebrew. It works. The cluster started off with "green" health. However, right after adding data, it has gone to "yellow". The cluster health is status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst

Getting an ElasticSearch Cluster to Green (Cluster Setup on OS X)

梦想的初衷 提交于 2021-02-05 13:53:05
问题 I have installed ElasticSearch on Mac OS X using Homebrew. It works. The cluster started off with "green" health. However, right after adding data, it has gone to "yellow". The cluster health is status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst

The Best way to use ElasticSearch in Spring java framework

落爺英雄遲暮 提交于 2021-02-05 13:15:12
问题 I'm developing a system which is planning to use elasticsearch as an data repository. I'm trying to choose the best way to develop my application that can index and query data from elasticsearch. The system I have is built on top of Spring framework. Is it a good choice to use Spring-data-elasticsearch (https://github.com/spring-projects/spring-data-elasticsearch)? Or is it a good choice to use elasticsearch core libraries itself ? I need to handle nested data (inner object) but Spring-data

The Best way to use ElasticSearch in Spring java framework

余生颓废 提交于 2021-02-05 13:11:28
问题 I'm developing a system which is planning to use elasticsearch as an data repository. I'm trying to choose the best way to develop my application that can index and query data from elasticsearch. The system I have is built on top of Spring framework. Is it a good choice to use Spring-data-elasticsearch (https://github.com/spring-projects/spring-data-elasticsearch)? Or is it a good choice to use elasticsearch core libraries itself ? I need to handle nested data (inner object) but Spring-data

Best way to integrate Spring boot with the Elastic search

随声附和 提交于 2021-02-05 11:33:25
问题 I'm new to Elastic search. We are building a Spring boot application with Elastic search. Currently, we are bound to use Spring Boot 2.1.3.RELEASE but we can use the latest stable Elastic search version. Done some R&D and found below two dependencies to integrate with Elastic search. 1. elasticsearch-rest-high-level-client 2. spring-boot-starter-data-elasticsearch There might be other ways of integrating the Spring boot with Elastic search. Could anyone help with identifying the best way to

elastic search match query over array object

爷,独闯天下 提交于 2021-02-05 11:29:28
问题 Suppose i've 3 doc doc_1 = { "citedIn": [ "Bar Councils Act, 1926 - Section 15", "Contract Act, 1872 - Section 23" ] } doc_2 = { "citedIn":[ "15 C. B 400", "Contract Act, 1872 - Section 55" ] } doc_3 = { "citedIn":[ "15 C. B 400", "Contract Act, 1872 - Section 15" ] } Here citedIn field is a array object.Now i want run a stander match query { "query": { "match": {"citedIn":{"query": "Contract act 15" , "operator":"and" }} } } The above query return all of the 3 doc, but it suppose to return

Elasticquent(ElasticSearch) Laravel limit

◇◆丶佛笑我妖孽 提交于 2021-02-05 11:21:27
问题 Hi I'm trying to get all results with elasticSearch query, but it returns only 10 results if $limit value is null. $videos = Video::searchByQuery([ 'match' => [ $field => $request->$field ], ],null,null,null); so how to get all results ? 回答1: That's because the default size for requests is 10 and not passing a length limit to any framework is probably going to set it to the default. You can use from and size with large values though: Though from and size can be set as request parameters, they

Multimatch query with Fuzzy NEST - ElasticSearch

爱⌒轻易说出口 提交于 2021-02-05 10:47:51
问题 I wrote the following query to check multiple fields from a value and it's work: var searchResponse = client.Search<Document>(s => s .Query(q => q .MultiMatch(a => a .Fields(f => f .Field(p => p.Attachment.Content) .Field(p => p.FileName)) .Query(queryValue)))); I would achieve the same result (search the queryValue in fields Attachment.Content and FileName) but with the Fuzzy mechanism (for example, if queryValue is "esting" I would get back also a result with filename "testing"). Thanks a

[elk]elasticsearch实现冷热数据分离

社会主义新天地 提交于 2021-02-05 10:02:56
目录 (?) [+] 本文以最新的elasticsearch-6.3.0.tar.gz为例,为了节约资源,本文将副本调为0, 无client角色 https://www.elastic.co/blog/hot-warm-architecture-in-elasticsearch-5-x 以前 es2 .x版本配置 elasticsearch .yml 里的 node .tag: hot这个配置不生效了 被改成了这个 node .attr .box_type: hot es架构 各节点的es配置 master节点: [root@n1 ~] # cat /usr/local/elasticsearch/config/elasticsearch.yml cluster.name: elk node.master: true node.data: false node.name: 192.168.2.11 #node.attr.box_type: hot #node.tag: hot path.data: /data/es path.logs: /data/log network.host: 192.168.2.11 http.port: 9200 transport.tcp.port: 9300 transport.tcp.compress: true discovery.zen

how to write an Elasticsearch query having multiple conditions

不羁岁月 提交于 2021-02-05 09:44:39
问题 Need help constructing an ES query. Here's an example of the raw JSON of the documents: { "user_uuid": 1234, "keywords": "apple", "@timestamp": "2020-01-15", }, { "uuid": 1234, "keywords": "google", "@timestamp": "2020-01-21", }, { "uuid": 9876, "keywords": "youtube", "@timestamp": "2020-01-25", } Here is an example requirement: { "search_groups":[ { "keywords": [ "google", "microsoft", "tesla" ], "time_range": 2020-01-17 - 2020-01-22 }, { "keywords": [ "apple", "youtube", "spotify" ], "time