映射索引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
最满意答案
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. ...
-
访问收件箱邮件(Accessing inbox messages)[2022-12-09]
首先,您必须确认已在清单文件中添加了权限。 以下权限适用于邮件 android.permission.RECEIVE_SMS android.permission.SEND_SMS 如果是这样,那么你就错过了如果你有多个联系人以及要检索所有联系人的消息的条件,那么你需要像下面那样塑造你的代码: public ListgetSms() { 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 ...