Skip to content

Instantly share code, notes, and snippets.

@billy3321
Created December 21, 2015 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billy3321/ae8e1fc837989e05a51b to your computer and use it in GitHub Desktop.
Save billy3321/ae8e1fc837989e05a51b to your computer and use it in GitHub Desktop.
curl -XPUT 'http://127.0.0.1:9200/judgements/' -d '{
"mappings": {
"judgement": {
"properties": {
"court": {
"type": "object",
"properties": {
"name": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"code": { "type": "string" }
}
},
"division": {
"type": "object",
"properties": {
"name": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"code": { "type": "string" }
}
},
"year": { "type": "integer" },
"word": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"number": { "type": "integer" },
"jcheck": { "type": "integer" },
"reason": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"content": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"structure": {
"type": "object",
"properties": {
"main": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"fact": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"reason": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" }
}
},
"characters": {
"type": "object",
"properties": {
"judges": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"prosecutors": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"lawyers": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"clerks": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"plaintiffs": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"defendants": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"prosecutor_office": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"creditors": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"debtors": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"judicial_associate_officer": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" }
}
},
"adjudged_at": { "type": "date", "format": "yyyy-MM-dd" },
"created_at": { "type": "date", "format": "date_time_no_millis" },
"updated_at": { "type": "date", "format": "date_time_no_millis" }
}
},
"schedule": {
"properties": {
"court": {
"type": "object",
"properties": {
"name": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"code": { "type": "string" }
}
},
"division": {
"type": "object",
"properties": {
"name": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"code": { "type": "string" }
}
},
"year": { "type": "integer" },
"word": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"number": { "type": "integer" },
"begin_at": { "type": "date", "format": "date_time_no_millis" },
"hall": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"section": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"process": { "type" : "string", "index" : "analyzed", "analyzer" : "cjk" },
"created_at": { "type": "date", "format": "date_time_no_millis" },
"updated_at": { "type": "date", "format": "date_time_no_millis" }
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment