fix mapping types for 5.x+

elasticsearch has deprecated the string type in 5.x, and is removing it in 6.x
This commit is contained in:
2017-03-01 11:23:23 -07:00
parent 0fb14d46c9
commit 0e0c3feab9

View File

@@ -1,22 +1,22 @@
import { DEFAULT_SETTING_DOCTYPE } from '../constants'; import { DEFAULT_SETTING_DOCTYPE } from '../constants';
const schema = { const schema = {
jobtype: { type: 'string', index: 'not_analyzed' }, jobtype: { type: 'keyword' },
payload: { type: 'object', enabled: false }, payload: { type: 'object', enabled: false },
priority: { type: 'byte' }, priority: { type: 'byte' },
timeout: { type: 'long' }, timeout: { type: 'long' },
process_expiration: { type: 'date' }, process_expiration: { type: 'date' },
created_by: { type: 'string', index: 'not_analyzed' }, created_by: { type: 'keyword' },
created_at: { type: 'date' }, created_at: { type: 'date' },
started_at: { type: 'date' }, started_at: { type: 'date' },
completed_at: { type: 'date' }, completed_at: { type: 'date' },
attempts: { type: 'short' }, attempts: { type: 'short' },
max_attempts: { type: 'short' }, max_attempts: { type: 'short' },
status: { type: 'string', index: 'not_analyzed' }, status: { type: 'keyword' },
output: { output: {
type: 'object', type: 'object',
properties: { properties: {
content_type: { type: 'string', index: 'not_analyzed' }, content_type: { type: 'keyword', index: false },
content: { type: 'object', enabled: false } content: { type: 'object', enabled: false }
} }
} }