按星期切分索引

  1. # PUT _ingest/pipeline/weeklyindex
  2. {
  3. "description": "weekly date-time index naming",
  4. "processors" : [
  5. {
  6. "date_index_name": {
  7. "field": "time",
  8. "index_name_prefix": "{{ _index }}-",
  9. "date_formats": [
  10. "yyyy-MM-dd'T'HH:mm:ss.SSS",
  11. "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
  12. ],
  13. "date_rounding": "w",
  14. "on_failure": [
  15. {
  16. "set": {
  17. "field": "_index",
  18. "value": "{{ _index }}-weeklyindex-failed"
  19. }
  20. }
  21. ]
  22. }
  23. }
  24. ]
  25. }