问题标签 [pyelasticsearch]
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.
python - Python Urllib ContextualVersionConflict
到 10 月 20 日,一切正常。10 月 21 日,它因以下消息而失败。任何人都可以在这里帮助
python - 带有预定义映射然后索引文档的 Elasticsearch 问题
我正在尝试索引 stackoverflow 数据。首先,我创建一个具有指定映射和设置的索引。
然后我尝试批量索引我的文档:
给定错误:('500 个文档未能索引。',[{'index':{'_index':'sof-question-answer2','_type':'Stackoverflow','_id':1', 'status': 400, 'error': {'type': 'illegal_argument_exception', 'reason': 'Mapper for [Body] 与现有映射冲突:\n[mapper [Body] 有不同的 [analyzer]]'}, '数据': ...}
elasticsearch - Python elasticsearch - GET找到文档但搜索没有
我正在弹性搜索中尝试基本命令,但我坚持使用基本搜索。
我的脚本:
根据调试日志,创建了一个文档,es.get
可以在索引中找到它,但es.search
不能。有谁知道问题出在哪里?
我也尝试过update
并且delete
都有效。Docs 并不是很有帮助。
编辑:
在 Kibana 中搜索工作:
所以它必须是特定于 Python 的。
elasticsearch - Python Elasticsearch update_by_query 不起作用
我想在 elasticsearch.py(版本 7.13.1)中使用 update_by_query 更新多个文档
我的查询是:
我已经尝试过匹配以及必须查询,但是文档没有得到更新,没有这样的错误。
我得到的回应是这样的:
如果我在 Kibana 上运行相同的查询,它会按预期工作。我在这里想念什么?
python - elasticsearch查询后如何仅选择或检索特定字段?
我能够在弹性搜索中查询索引。而且,现在我想将数据缩小到某些特定字段。但是,我不断收到错误。
这是我的查询:
到目前为止,我很容易得到结果。但是,由于返回的字段太多,我想在将其转换为数据框之前只检索特定字段。我可以将其转换为数据框,然后进行过滤,但这不是最佳的。
我尝试添加_source
和field
方法:
和其他变体,例如,
我不断收到错误:
我跟着:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering
- 几个stackoverflow答案
- 甚至尝试过命名查询
我在这里想念什么?
python - 如何在 elasticsearch eland 中搜索精确索引(不是索引模式)?
我正在使用 eland 调用弹性搜索数据。文档很简单,我能够实现它,但是在搜索它搜索的索引时,它es_index_pattern
基本上是一个通配符索引字符串。
我必须手动输入错误消息,因为我无法将错误复制到我正在使用的环境之外。另外,我的主机和端口会有所不同
我认为这elasticsearch
能够得到结果,因为它调用了确切的索引名称,因此不会遇到超时。但是,Eland
宁可将es_index_pattern
其my_index
用作通配符 ie *my_index
,因此我必须遇到ReadTimeOutError
.
我查看了源代码,看看是否有什么我能做的,所以它没有将索引作为模式搜索,而是完全匹配。但是,我看不到在文档和源代码中搜索确切索引的选项。
如何在 Eland 中搜索准确的索引字符串?
资料来源:
python - 如何在 elasticsearch eland 中搜索精确索引(不是索引模式) - 已更新?
我正在使用 eland 调用弹性搜索数据。文档很简单,我能够实现它,但是在搜索索引时,它使用的索引字符串es_index_pattern
基本上是一个通配符(它也在文档中说明)。
我必须手动输入错误消息,因为我无法将错误复制到我正在使用的环境之外。另外,我的主机和端口会有所不同
我认为通过搜索elasticsearch
能够获得结果,因为它调用了确切的索引名称,因此不会遇到超时。
但是,Eland
宁可将es_index_pattern
其my_index
用作通配符 ie *my_index*
,因此我必须遇到ReadTimeOutError
.
我查看了源代码,看看是否有什么我能做的,所以Eland
没有将索引作为模式搜索,而是完全匹配。但是,我看不到在文档和源代码中搜索确切索引的选项。
如何在 Eland 中搜索准确的索引字符串?
资料来源: