小编Div*_*ank的帖子

类型错误:__init__() 缺少 1 个必需的位置参数:弹性搜索中的“方案”

下面是我的代码-

Elasticsearch 不使用 https 协议,而是使用 http 协议。

pip uninstall elasticsearch
pip install elasticsearch==7.13.4
import elasticsearch.helpers
from elasticsearch import Elasticsearch
# from elasticsearch import Elasticsearch, RequestsHttpConnection

es_host = '<>'
es_port = '<>'
es_username = '<>'
es_password = '><'
es_index = '<>'

es = Elasticsearch([{'host':str(es_host),'port':str(es_port)}], http_auth=(str(es_username), str(es_password)))

es.indices.refresh(index=es_index)
Run Code Online (Sandbox Code Playgroud)

错误-

10 es = Elasticsearch([{'host': str(es_host), 'port': str(es_port)}],http_auth=(str(es_username), str(es_password)))
     11 
     12 es.indices.refresh(index=es_index)

3 frames
/usr/local/lib/python3.7/dist-packages/elasticsearch/_sync/client/__init__.py in __init__(self, hosts, cloud_id, api_key, basic_auth, bearer_auth, opaque_id, headers, connections_per_node, http_compress, verify_certs, ca_certs, client_cert, client_key, ssl_assert_hostname, ssl_assert_fingerprint, ssl_version, ssl_context, …
Run Code Online (Sandbox Code Playgroud)

python elasticsearch

9
推荐指数
2
解决办法
2万
查看次数

将字段丰富到另一个索引时出现错误 502,{“ok”:false,“message”:“后端关闭连接”}

我有两个索引 1.ther 2.part。“ther”索引有 24 个字段,“part”索引有 19 个字段。我必须用“part”索引字段来丰富“ther”索引。

字段“user_id”在两个索引之间是通用的。使用丰富过程我尝试创建第三个索引“part_ther”

get ther/_search
{
        "_index" : "ther",
        "_type" : "_doc",
        "_id" : "2",
        "_score" : 1.0,
        "_source" : {
          "Ahi" : 42.6,
          "Index" : 90,
          "ipapPressureAverage" : 49,
          "MinuteVentAverage" : 20,
          "DeviceSerialNumber" : "<>",
          "ClearAirwayApneaIndex" : 72.26135463,
          "PeriodicBreathingTime" : 9311,
          "cpapPressure90Pct" : 22,
          "epapPressureAverage" : 73,
          "ipapPressure90Pct" : 27,
          "Usage" : 93904,
          "epapPressure90Pct" : 10,
          "AverageBreathRate" : 65,
          "@timestamp" : "2021-08-29T00:00:00.000+05:30",
          "user_id" : "39,476",
          "TrigBreathsPct" : 93,
          "cpapPressureAverage" : 29,
          "AverageExhaledTidalVolume" : 20, …
Run Code Online (Sandbox Code Playgroud)

field elasticsearch logstash kibana

3
推荐指数
1
解决办法
3756
查看次数

/bin/sh: find: 在 rockylinux:8 的 dockerfile 中找不到命令

我在 os: 中创建了 dockerfile rockylinux:8。出现错误:/bin/sh: find: command not found

Dockerfile:

FROM rockylinux:8 AS builder

RUN mkdir /usr/share/dashboards
WORKDIR /usr/share/dashboards
RUN find /usr/share/dashboards
Run Code Online (Sandbox Code Playgroud)

错误-

/bin/sh: find: command not found
The command '/bin/sh -c find /usr/share/dashboards' returned a non-zero code: 127
Run Code Online (Sandbox Code Playgroud)

docker dockerfile

-2
推荐指数
1
解决办法
1993
查看次数

标签 统计

elasticsearch ×2

docker ×1

dockerfile ×1

field ×1

kibana ×1

logstash ×1

python ×1