首页 \ 问答 \ 映射索引Elasticsearch时间戳自定义(Mapping index Elasticsearch timestamp custom)

映射索引Elasticsearch时间戳自定义(Mapping index Elasticsearch timestamp custom)

我在Elasticsearch中上传索引时遇到问题。

curl -H "Content-Type: application/json" -XPUT http://localhost:9200/technogym_error_timeline -d "{\"mappings\":{\"timestamp\":{\"type\":\"date\",\"format\":\"yyyy-MM-dd\"}}}"

我收到此错误:

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [format : yyyy-MM-dd] [type : date]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [timestamp]: Root mapping definition has unsupported parameters:  [format : yyyy-MM-dd] [type : date]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [format : yyyy-MM-dd] [type : date]"}},"status":400}

为什么我的curl命令错了?

谢谢。


I have problem with the uploading of index in Elasticsearch.

curl -H "Content-Type: application/json" -XPUT http://localhost:9200/technogym_error_timeline -d "{\"mappings\":{\"timestamp\":{\"type\":\"date\",\"format\":\"yyyy-MM-dd\"}}}"

I get this error:

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [format : yyyy-MM-dd] [type : date]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [timestamp]: Root mapping definition has unsupported parameters:  [format : yyyy-MM-dd] [type : date]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [format : yyyy-MM-dd] [type : date]"}},"status":400}

Why is my curl command wrong?

Thanks.


原文:https://stackoverflow.com/questions/44160642
更新时间:2023-12-26 22:12

最满意答案

  • https://graph.microsoft.com/v1.0/me/messages

    表示提供对所有消息的访问的顶级“消息”资源。 然后,您可以使用可选参数过滤它们。

    例如 ,添加以下过滤器参数会将返回的消息限制为仅具有emailAddress属性jon@contoso.com的消息。 https://graph.microsoft.com/v1.0/me/messages?filter=emailAddress eq 'jon@contoso.com'

  • https://graph.microsoft.com/v1.0/me/mailfolders('inbox')/messages

    资源表示特定文件夹中的邮件(在本例中为“收件箱”文件夹)。


  • https://graph.microsoft.com/v1.0/me/messages

    Represents a top-level "messages" resource that provides access to all messages. You can then filter them using optional parameters.

    For example, adding the following filter parameter restricts the messages returned to only those with the emailAddress property of jon@contoso.com. https://graph.microsoft.com/v1.0/me/messages?filter=emailAddress eq 'jon@contoso.com'

  • https://graph.microsoft.com/v1.0/me/mailfolders('inbox')/messages

    Resource represents messages in a specific folder ('inbox' folder in this case).

相关问答

更多
  • person列的值(如果存在)不是发件人的名称。 这是一个用于查询Contacts Provider以获取名称的ID。 如果你的person空,那么你将不得不使用address ,即电话号码来查询。 例如: String address = cursor.getString(cursor.getColumnIndex("address")); final String[] projection = new String[] {ContactsContract.Data.DISPLAY_NAME}; St ...
  • 您目前无法使用API删除收件箱邮件。 作为权限状态( read_mailbox ),API仅提供对消息的只读访问。 You cannot delete a inbox message using the API currently. As the permission states (read_mailbox), the API only provides read-only access to messages.
  • 我不认为可以获取收件箱消息的计数,您可以尝试包含一个限制参数以在一次调用中获得更多注释。 但重点是你需要read_mailbox权限,你很可能不会批准它: 此权限授予在Facebook尚不可用的平台上构建Facebook品牌客户端的应用程序。 例如,Android和iOS应用不会获得此权限的批准。 此外,Web,桌面,车载和电视应用程序将不被授予此权限。 资料来源: https : //developers.facebook.com/docs/facebook-login/permissions/v2.2# ...
  • 尝试 Message msg = inbox.getMessage(j); msg.setFlag(Flags.Flag.DELETED, true); if (msg.isSet(Flags.Flag.DELETED)) { inbox.close(true); return true; } Try Message msg = inbox.getMessage(j); msg.setFlag(Flags.Flag.DELETED, true); if (msg.isSet(Flags.F ...
  • 所有消息实际上都在图表中,您无法看到它们。 您可以通过选择一个thread-id并在其中附加“_messagenumber”来自己查看所有消息仍然存在。 / threadid_000将检索该线程中的第一条消息,即使您无法通过线程分页来检索该消息。 那为什么我不能正常检索它们? 问题似乎在于分页链接。 分页使用“until”和“since”参数来获取下一批消息。 线程分页链接的一般形式: graph.facebook.com/ messageid / comments?limit = 25&since = e ...
  • 你的消息都显示为未读,因为read_at字段永远不会从nil更改。 看起来你的readingmessage方法应该改变它的值,但它永远不会被调用。 (在控制器的show方法中调用它是有意义的。) 模型: def readingmessage self.read_at ||= Time.now save end 控制器: def show @message = Message.find(params[:id]) @message.readingmessage if @messag ...
  • 我会做这样的事情: class User has_many :mailboxes has_many :messages, :through => :tags has_many :tags end class Message has_many :users, :through => :tags has_many :mailboxes, :through => :tags has_many :tags end class Mailbox has_many :tags has_ ...
  • https://graph.microsoft.com/v1.0/me/messages 表示提供对所有消息的访问的顶级“消息”资源。 然后,您可以使用可选参数过滤它们。 例如 ,添加以下过滤器参数会将返回的消息限制为仅具有emailAddress属性jon@contoso.com的消息。 https://graph.microsoft.com/v1.0/me/messages?filter=emailAddress eq 'jon@contoso.com' https://graph.microsoft. ...
  • 首先,您必须确认已在清单文件中添加了权限。 以下权限适用于邮件 android.permission.RECEIVE_SMS android.permission.SEND_SMS 如果是这样,那么你就错过了如果你有多个联系人以及要检索所有联系人的消息的条件,那么你需要像下面那样塑造你的代码: public List getSms() { List lstSms = new ArrayList(); Sms objSms = new Sms(); U ...
  • 这可以通过检查项目类型来完成,如下所示: if(myItem.getItemClass().equals("IPM.Note")){ // this is an email } 所有项目类型都可以在这里找到: http://msdn.microsoft.com/en-us/library/office/bb176446(v=office.12).aspx This can be done by checking on the item type as follows: if(myItem.getIt ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)