2014-03-13 2 views
0

Es 인덱스에 datetime 값을 삽입하려고합니다. 그러나 나는 그 순간에 그것을 이해하지 못한다.ElasticSearch 필드 유형 "date"inserted date ('Y-m-d H : i : s')

예를 들어. "eventDate"=> "date"그리고 "eventDate"=> date ('Ymd H : i : s')로 문서 색인 생성을 시도합니다.이 오류가 발생합니다 :

IllegalArgumentException [잘못된 형식 : \ "2014-03 -13 15 : 36 : 15 \ "이 (는) \"15 : 36 : 15 \ "에 잘못되었습니다. ","status ": 400}

변경해야 할 부분을 모르지만 나중에 키바 히스토그램의 해당 필드를 날짜 필드로 사용하고 싶습니다.

에스 워드 프로세서에서

나는이 같은 날짜 형식을 보았다 "내지 Ym-DTH를 : I : S" 무엇 중간 ??이 "T"를 수행하고 내가 어떻게 색인이 정확히 같은

!?

도움을 주셔서 감사합니다. 마크

답변

1

T은 단순히 날짜의 구분자이며,에서 자세한 내용을 볼 수 있습니다.:

A single point in time can be represented by concatenating a complete date expression, the letter T as a delimiter, and a valid time expression. For example "2007-04-05T14:30". If a time zone designator is required, it follows the combined date and time. For example "2007-04-05T14:30Z" or "2007-04-05T12:30-02:00".

Either basic or extended formats may be used, but both date and time must use the same format. The date expression may be calendar, week, or ordinal, and must use a complete representation. The time expression may use reduced accuracy. It is permitted to omit the 'T' character by mutual agreement.

그리고 인덱싱 에러, (그냥 UTC을 의미, Z을 넣을 수 있습니다) 또한 시간대를 T 구분 기호를 넣어하려고

. 그 후에는 Kibana의 그래프를 그릴 수 있어야합니다.