小编Gau*_*m M的帖子

如何使elasticsearch为所有索引中的每个文档添加时间戳字段?

Elasticsearch专家,

我一直无法找到一种简单的方法来告诉ElasticSearch为所有索引(以及所有文档类型)中添加的所有文档插入_timestamp字段.

我看到了一个特定类型的例子:http: //www.elasticsearch.org/guide/reference/mapping/timestamp-field/

并且还查看特定类型的所有索引的示例(使用_all):http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping/

但是我无法找到任何关于添加它的文档,无论索引和类型如何,都会添加它.

mapping timestamp elasticsearch

34
推荐指数
4
解决办法
5万
查看次数

如何获得urllib3和请求使用jython 2.7 beta 1?

聪明人,

我想在我的jython程序中使用awesome requests模块.它在python中安装和运行得很好,但我无法在jython中安装它.我在mac和ubuntu上尝试了Jython 2.7a2和2.7b1,并获得了与urllib3相关的相同错误.

首先安装了如何使用jython setup.py install中提到的ez_setup.py

然后从jython bin目录中运行easy_install会导致异常:

NameError: name 'CERT_NONE' is not defined
gautam-mbp:bin gautam$ ./easy_install requests
Searching for requests
Reading http://pypi.python.org/simple/requests/
Reading http://python-requests.org
Reading https://github.com/kennethreitz/requests
Best match: requests 1.1.0
Downloading http://pypi.python.org/packages/source/r/requests/requests-1.1.0.tar.gz#md5=a0158815af244c32041a3147ee09abf3
Processing requests-1.1.0.tar.gz
Running requests-1.1.0/setup.py -q bdist_egg --dist-dir /var/folders/jf/cb2pc45s7d94hd6sndysvyxw0000gn/T/easy_install-MnOao_/requests-1.1.0/egg-dist-tmp-E2Rkg1
Traceback (most recent call last):
  File "./easy_install", line 7, in <module>
    sys.exit(
  File "/Users/gautam/jython27b1/Lib/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in main
  File "/Users/gautam/jython27b1/Lib/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage
  File "/Users/gautam/jython27b1/Lib/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 1712, in <lambda>
-----------lots of stack trace---------------
  File …
Run Code Online (Sandbox Code Playgroud)

jython urllib3

6
推荐指数
1
解决办法
4630
查看次数

标签 统计

elasticsearch ×1

jython ×1

mapping ×1

timestamp ×1

urllib3 ×1