ElasticSearch

ElasticSearch: Use a compound tenant-ID + page-ID field?

别说谁变了你拦得住时间么 提交于 2021-02-07 21:28:34
问题 I've just starated devising an ElasticSearch mapping for a multitenant web app. In this app, there are site ID:s and page ID:s. Page ID:s are unique per site, and randomly generated. Pages can have child pages. What is best: 1) Use a compound key with site + page-ID:s? Like so: "sitePageIdPath": "(siteID):(grandparent-page-ID).(parent-page-ID).(page-ID)" or: 2) Use separate fields for site ID and page IDs? Like so: "siteId": "(siteID)", "pageIdPath": "(grandparent-page-ID).(parent-page-ID).

ElasticSearch: Use a compound tenant-ID + page-ID field?

不打扰是莪最后的温柔 提交于 2021-02-07 21:27:53
问题 I've just starated devising an ElasticSearch mapping for a multitenant web app. In this app, there are site ID:s and page ID:s. Page ID:s are unique per site, and randomly generated. Pages can have child pages. What is best: 1) Use a compound key with site + page-ID:s? Like so: "sitePageIdPath": "(siteID):(grandparent-page-ID).(parent-page-ID).(page-ID)" or: 2) Use separate fields for site ID and page IDs? Like so: "siteId": "(siteID)", "pageIdPath": "(grandparent-page-ID).(parent-page-ID).

Different score functions in bool query

拈花ヽ惹草 提交于 2021-02-07 20:45:25
问题 I am working in a products index on elasticsearch. I have a bool query with groups of multi-match for retrieving the results I want: { "query": { "bool": { "should": [ { "multi_match": { "query": "term", "fields": [ "name^3.0", "name.fullName^10.0", "description", "description.fullDesc", "detail", "detail.fullDetail" ], "type": "cross_fields", "operator": "AND", "slop": 0, "prefix_length": 0, "max_expansions": 50, "zero_terms_query": "NONE", "auto_generate_synonyms_phrase_query": true, "fuzzy

Different score functions in bool query

♀尐吖头ヾ 提交于 2021-02-07 20:44:17
问题 I am working in a products index on elasticsearch. I have a bool query with groups of multi-match for retrieving the results I want: { "query": { "bool": { "should": [ { "multi_match": { "query": "term", "fields": [ "name^3.0", "name.fullName^10.0", "description", "description.fullDesc", "detail", "detail.fullDetail" ], "type": "cross_fields", "operator": "AND", "slop": 0, "prefix_length": 0, "max_expansions": 50, "zero_terms_query": "NONE", "auto_generate_synonyms_phrase_query": true, "fuzzy

Elasticsearch 7.3 homebrew

馋奶兔 提交于 2021-02-07 17:15:43
问题 I was using Elasticsearch 6.8 via homebrew, now I was trying to upgrade to 7.3. Now on 6.8 I already got a warning about a log file that did not exist but the server would still run. Now with 7.3 I get a error and the server wont run: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] output: [0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory [0.002s][error][logging] Initialization of output 'file=logs/gc.log' using

Elasticsearch 7.3 homebrew

岁酱吖の 提交于 2021-02-07 17:14:16
问题 I was using Elasticsearch 6.8 via homebrew, now I was trying to upgrade to 7.3. Now on 6.8 I already got a warning about a log file that did not exist but the server would still run. Now with 7.3 I get a error and the server wont run: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] output: [0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory [0.002s][error][logging] Initialization of output 'file=logs/gc.log' using

Elasticsearch 7.3 homebrew

我的未来我决定 提交于 2021-02-07 17:12:35
问题 I was using Elasticsearch 6.8 via homebrew, now I was trying to upgrade to 7.3. Now on 6.8 I already got a warning about a log file that did not exist but the server would still run. Now with 7.3 I get a error and the server wont run: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] output: [0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory [0.002s][error][logging] Initialization of output 'file=logs/gc.log' using

Elasticsearch 7.3 homebrew

一曲冷凌霜 提交于 2021-02-07 17:12:24
问题 I was using Elasticsearch 6.8 via homebrew, now I was trying to upgrade to 7.3. Now on 6.8 I already got a warning about a log file that did not exist but the server would still run. Now with 7.3 I get a error and the server wont run: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] output: [0.002s][error][logging] Error opening log file 'logs/gc.log': No such file or directory [0.002s][error][logging] Initialization of output 'file=logs/gc.log' using

Elasticsearch query based on timestamp

那年仲夏 提交于 2021-02-07 11:23:08
问题 This is my elasticsearch query that intends to filter data between 11 pm and 12 pm on the day 2015.08.04. But it doesn't filter and gives many errors. "query" : {"range" : {"@timestamp" : {"gt" : "2015-08-04 11:00:00", "lt" : "2015-08-04 12:00:00"} } } 回答1: It works with the following query { "query":{ "range":{ "@timestamp":{ "gte":"2015-08-04T11:00:00", "lt":"2015-08-04T12:00:00" } } } } 来源: https://stackoverflow.com/questions/32619909/elasticsearch-query-based-on-timestamp

java.io.StreamCorruptedException: invalid internal transport message format

会有一股神秘感。 提交于 2021-02-07 11:22:12
问题 I am working on elasticsearch 0.90.5 on ubuntu 13.04 in LAN environment. When I start it I get StreamCorruptedException . There are no other instances running and I haven't configured anything else. Things were good when I did the same thing on my laptop with ubuntu-12.04. Full stacktrace is as below : prayag@prayag:~$ JVM/elasticsearch-0.90.5/bin/elasticsearch -f [2013-10-22 02:01:40,400][INFO ][node ] [The Blank] version[0.90.5], pid[10767], build[c8714e8/2013-09-17T12:50:20Z] [2013-10-22