首页 \ 问答 \ 重新索引后Elasticsearch不遵循_mapping(Elasticsearch doesn't obey _mapping after reindex)

重新索引后Elasticsearch不遵循_mapping(Elasticsearch doesn't obey _mapping after reindex)

我有一个名为last_post_date的字段存储在elasticsearch中。

它显示为:

...
"last_post_date": "1485281760000",
...

并将映射为:

"last_post_date": {
    "type": "text",
    "fields": {
        "keyword": {
            "type": "keyword",
            "ignore_above": 256
        }
    }
},

现在我创建一个新的索引,映射为:

...
"last_post_date": {
    "type": "date",
    "format": "epoch_millis",
    "index": true,
    "doc_values": true
},
...

并通过以下方式完成重新索引: http//127.0.0.1 :9200 / repindex

问题是,即使重新索引后,字段的值也会存储为字符串而不是日期,而映射显示:

...
"last_post_date": {
    "type": "date",
    "store": true,
    "format": "epoch_millis"
},
...

知道为什么吗?


I have a field called last_post_date stored in elasticsearch.

It's shown as:

...
"last_post_date": "1485281760000",
...

And has the mapping as:

"last_post_date": {
    "type": "text",
    "fields": {
        "keyword": {
            "type": "keyword",
            "ignore_above": 256
        }
    }
},

Now I create a new index with the mapping as:

...
"last_post_date": {
    "type": "date",
    "format": "epoch_millis",
    "index": true,
    "doc_values": true
},
...

And do a full reindex via: http://127.0.0.1:9200/_reindex

The problem is that even after reindexing the field's value is stored as string instead of date while the mapping shows:

...
"last_post_date": {
    "type": "date",
    "store": true,
    "format": "epoch_millis"
},
...

Any idea why?


原文:https://stackoverflow.com/questions/42427945
更新时间:2023-10-24 18:10

最满意答案

这是您的提交消息中的行号。


That are the line numbers from your commit message.

相关问答

更多
  • 如果您只需要搜索每个日志条目的第一行,并且您正在使用GNU grep,则可以执行svn log . | grep -B2 artf29999 svn log . | grep -B2 artf29999 svn log . | grep -B2 artf29999 。 If you only need to search the first line of each log entry and you are using GNU grep, you can do svn log . | grep -B2 a ...
  • limit选项,例如: svn log --limit 4 svn log -l 4 只有最后4个条目 limit option, e.g.: svn log --limit 4 svn log -l 4 Only the last 4 entries
  • 我认为并期望,您在修订版中有基本的布局更改,在每个版本之前无法转换历史记录 - 如果您从repo-root转换而且|或者未在.hgrc中定义树相关的.vn。*选项 如何调试你的案例 检查存储库的svn-client日志( svn URL-OF-REPO-ROOT -v将显示文件,受完整路径的修订影响) - 如果布局已更改,则必须在两个或更多步骤中转换源repo,使用正确的选项一次性转换具有永久布局的范围 svn.trunk 中继线的相对路径(默认值:“trunk”) svn.branches 树枝树的相对路 ...
  • tags目录的日志应该包含你制作标签时提交的修订版本,然后你的trunk的版本号会小于那个。 或者我误解了什么? 查看我的类库: 我的类库标签的目录的WebSVN视图 您可以看到每个构建最终的修订版本,因为它是相同的存储库,标记的修订版号比标记的更改的主干中的最大可能修订版本高1。 以下是使用简单的svn log命令查看的内容: [C:\Temp] :svn log http://svn.vkarlsen.no/svn/LVK/LVK_3_5/tags -------------------------- ...
  • 您需要重新翻译几个最新的修订版本,包括您编辑该信息的修订版本。 假设您编辑了修订版REV和先前修订版的消息 PREV = REV - 1 在这种情况下,以下命令应该有所帮助: subgit install --rebuild-from-revision PREV path/to/git/repository 请注意,之后Git SHA-1哈希值将被更改。 您建议的命令将导致新的SVN修订版,而不会影响现有版本。 特别是git push -f会导致分支/主干更换,这是不推荐的。 首选--rebuild-f ...
  • 如果希望减少svn log -q的输出,可以使用其他命令过滤输出。 如果经常需要减少输出,可以在.bashrc添加函数定义,并使用此函数代替svn log -q 。 我认为以下功能对您有用。 您可以将它与svn-log -r 42:7 : function svn-log() { svn log -q "$@" | sed -ne 's/^\(r[0-9]*\).*$/\1/p' } If you want a reduced output of svn log -q, you can f ...
  • 在我看来,你应该运行svn log --verbose --revision 60524 https://svn.example.com/repos/或svn log --verbose --revision 60524 https://svn.example.com/repos/branches或指定实际受r60524影响的另一个分支。 我可能会误解这个问题,但看起来您提供的URL不正确。 修订版r60524未触及/Release分支,因此命令不显示任何内容。 因此,我建议对存储库的根目录运行命令并添加- ...
  • 这是您的提交消息中的行号。 That are the line numbers from your commit message.
  • SVN无法自行显示。 您需要编写自己的程序来解析svn log的输出并查询AD以进行转换。 如果您使用--xml开关,这将更容易,因为您不必执行尽可能多的文本解析操作 - 您可以使用XML解析库,这将更容易。 附注:贵公司的新政策让我感到难过。 SVN can't display it on its own. You will need to write your own program to parse the output of svn log and query AD to do the transl ...
  • 右键单击您的存储库,选择TortoiseSVN,显示日志。 单击“全部显示”按钮,以显示所有条目。 选择所有日志,右键单击,复制到剪贴板或Ctrl + C. Right-click on your repository, select TortoiseSVN, Show log. Click the Show All button so that all the entries are shown. Select all the logs, right-click, copy to clipboard or ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。