1. PUT testinfo_index
    2. {
    3. "mappings": {
    4. "properties": {
    5. "id": {
    6. "type": "long"
    7. },
    8. "title": {
    9. "type": "keyword"
    10. },
    11. "content": {
    12. "analyzer": "ik_max_word",
    13. "type": "text",
    14. "fields": {
    15. "keyword": {
    16. "ignore_above": 256,
    17. "type": "keyword"
    18. },
    19. "available": {
    20. "type": "boolean"
    21. },
    22. "review": {
    23. "type": "nested",
    24. "properties": {
    25. "nickname": {
    26. "type": "text"
    27. },
    28. "text": {
    29. "type": "text"
    30. },
    31. "stars": {
    32. "type": "integer"
    33. }
    34. }
    35. },
    36. "publish_time": {
    37. "type": "date",
    38. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
    39. },
    40. "expected_attendees": {
    41. "type": "integer_range"
    42. },
    43. "ip_addr": {
    44. "type": "ip"
    45. },
    46. "suggest": {
    47. "type": "completion"
    48. }
    49. }
    50. }
    51. }
    52. }
    53. }