问题标签 [amazon-elasticsearch]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
performance - 过滤布尔字段会增加延迟和 CPU
我正在使用 AWS ElasticSearch 服务 (1.5.2) 并且每秒接收超过 100 个请求而没有问题。
几乎每个查询都有地理过滤器、全文过滤器、整数过滤器……但我有一个问题,多添加一个简单的过滤器;一个布尔项过滤器。
添加布尔过滤器后,ElasticSearch 的所有节点中的 CPU 从 10% 增加到 30%,在 10-15 分钟内,平均延迟从 20 毫秒增加到 400 毫秒,一段时间后延迟恢复到正常数字,但 CPU 没有。
该布尔字段已正确映射并且可搜索......有人暗示过这个问题吗?(由于我使用的是官方 Java 库,查询是用“terms”而不是“term”形成的)。
amazon-web-services - AWS Elasticsearch Service 未授权执行滚动
我正在尝试使用elasticdump
从 AWS Elasticsearch Service 复制索引:
政策的相关部分:
在 100 个对象之后,我得到:
为什么 AWS 阻止我滚动?
php - 通过 AWS Kinesis Firehose 插入时,是否可以手动设置 ElasticSearch 文档 ID?
我设置了一个 AWS Kinesis Firehose Stream 来将数据馈送到 AWS ElasticSearch 集群,我可以通过将文档发送到 Firehose Stream 来成功插入文档,Firehose Stream 将它们加载到 ElasticSearch 中。
但我希望能够在将文档id
发送到 Firehose Stream 时手动指定/设置文档的值。我已成功使用 AWS PHP SDK 将数据发送到 Firehose,但我不知道是否有办法手动设置文档的id
.
我尝试在 JSON 数据中设置id
、_id
和esDocumentId
值,但均无济于事。
有人有想法么?
amazon-web-services - 允许 Elastic beanstalk 应用程序访问 elasticsearch 域
我正在尝试允许 beanstalk 应用程序访问我们的 elasticsearch 服务,但是我在您的文档中找到的每种方法都无法授予对这些应用程序的访问权限。到目前为止,在启用访问方面对我有用的唯一方法是将集群向整个世界开放,并启用特定的 IP(鉴于 Elastic beanstalk 的动态特性,这显然不是一种选择)。我尝试过的 - 创建从“允许或拒绝访问一个或多个账户...”到我们 AWS 账户的根目录的策略。创建从“允许或拒绝访问一个或多个帐户...”到分配给 beanstalk EC2 服务器的 IAM 角色的策略 将策略附加到 beanstalk IAM 角色,允许他在 elasticsearch 域上具有 ES:* 权限。
为什么所有这些方法都失败了?该文档似乎表明这些方法中的每一个都应该有效,那么我在这里缺少什么?
elasticsearch - ElasticSearch querying using JestClient seems to be very slow
I have recently read about Elasticsearch, and I am using Jest to interact with Amazon Elasticsearch Service. I have been able to leverage Jest's documents and index data into the ES.
However, when I try to query using a boolean query, I see extremely high latencies. I tried performing a POST request using POSTMAN and I see the latencies to be much much lower.
Here's the example:
Jest Query: Given a key, value: Return a list of objects.
JestClient client:
Output: SearchBuilder: 12 ClientExecute: 1193
On the other hand using POSTMAN: I have the POST request with the body:
This is performed on: es.ap-southeast-1.es.amazonaws.com/index/_search Output:
"took": 1, "timed_out": false, "_shards": { "total": 10, "successful": 10, "failed": 0 },
I tried using Searchsourcebuilder as well. But to no avail. Am I using the right API?
amazon-web-services - AWS 弹性搜索中的脚本
我在网上阅读了有关 aws elacticsearch 服务中的脚本的信息。它说 AWS ES 不支持动态脚本,所以我正在使用存储在磁盘中的脚本编写聚合。我写了以下查询
但我不断收到这个错误。
我在网上搜索了很多,但找不到一个好的解决方案。完全错误->
这是我的脚本 init.groovy
地图.groovy
梳子.groovy
red.groovy
我一直在关注ElacticSearch 网站上的本教程
amazon-web-services - 弹性搜索中的最长前缀查询
我正在尝试在 Elasticsearch 中进行最长前缀查询。我的要求是假设我有数字
在弹性搜索中,我查询1234567它应该返回具有最长公共字符序列的数字。在这种情况下,它是 12345。我在网上搜索了一些解决方案,但它们都需要脚本是弹性搜索。我正在使用 AWS Elasticservice,并且必须在 AWS 上查询此查询。出于“安全原因”,AWS 不允许使用脚本。有什么方法可以在不使用脚本的情况下实现此查询?
amazon-web-services - Permissions to access ElasticSearch from Lambda?
I'm trying to use Elasticsearch for data storage for a Lambda function connected to Alexa Skills Kit. The Lambda works alright without Elasticsearch but ES provides much-needed fuzzy matching.
The only way I've been able to access it from Lambda is by enabling Elasticsearch global access but that's a really bad idea. I've also been able to access from my computer via open access policy or IP address policy. Is there a way to do read-only access via Lambda and read-write via IP?
On IAM I granted my Lambda role AmazonESReadOnlyAccess. On the ES side I tried this but it only worked for IP address:
This forum post asks the same question but went unanswered.
amazon-web-services - 使用logstash将数据流式传输到亚马逊弹性搜索?
所以我启动了一个 2 实例 Amazon Elasticsearch 集群。
我已经安装了logstash-output-amazon_es插件。这是我的logstash配置文件:
现在我从我的终端运行它:
我得到错误:
我想我完全错了。基本上我只想通过logstash向我的亚马逊elasticsearch集群提供一些虚拟日志输入。我应该如何进行?
编辑存储类型为实例,访问策略设置为可供所有人访问。
编辑
elasticsearch - 如何在弹性搜索(aws)中存储日期范围数据并搜索范围?
我正在尝试在弹性搜索中存储酒店房间可用性。然后我需要搜索从某个日期到另一个日期可用的房间。我想出了两种存储可用性数据的方法,它们如下:
这里可用性字典存储所有日期,每个日期键的值是true还是false,表示它在当天是否可用。
此处可用性数组仅存储可用房间的日期
我想搜索所有房间,这些房间都可以使用from_date
,to_date
应该查看availability
字典或数组。我的日期范围可能长达 365 天
如何存储这些可用性数据,以便我可以轻松地执行上述搜索?而且我找不到任何方法来搜索日期范围,所以有什么建议吗?
请注意,其中的项目availability
可能不会保持分类。而且我可能有超过 1 亿条记录可供搜索。