1. 2.建立mapping
    2. curl -XPOST http://192.168.2.226:49200/log_idc2/java/_mapping -d'
    3. {
    4. "java": {
    5. "properties": {
    6. "bsid": {
    7. "index": "not_analyzed",
    8. "type": "string"
    9. },
    10. "ln": {
    11. "type": "long"
    12. },
    13. "iid": {
    14. "index": "not_analyzed",
    15. "type": "string"
    16. },
    17. "lvn": {
    18. "type": "long"
    19. },
    20. "esid": {
    21. "index": "not_analyzed",
    22. "type": "string"
    23. },
    24. "cl": {
    25. "index": "not_analyzed",
    26. "type": "string"
    27. },
    28. "proj": {
    29. "index": "not_analyzed",
    30. "type": "string"
    31. },
    32. "lv": {
    33. "index": "not_analyzed",
    34. "type": "string"
    35. },
    36. "m": {
    37. "index": "not_analyzed",
    38. "type": "string"
    39. },
    40. "tsn": {
    41. "type": "long"
    42. },
    43. "txt": {
    44. "type": "string",
    45. "index" : "analyzed",
    46. "analyzer":"standard",
    47. "fields" : {
    48. "ik" : {
    49. "type" : "string",
    50. "index" : "analyzed",
    51. "analyzer":"ik"
    52. }
    53. }
    54. },
    55. "ex": {
    56. "type": "string",
    57. "index" : "analyzed",
    58. "analyzer":"standard",
    59. "fields" : {
    60. "ik" : {
    61. "type" : "string",
    62. "index" : "analyzed",
    63. "analyzer":"ik"
    64. }
    65. }
    66. },
    67. "file": {
    68. "index": "not_analyzed",
    69. "type": "string"
    70. },
    71. "th": {
    72. "index": "not_analyzed",
    73. "type": "string"
    74. },
    75. "lg": {
    76. "index": "not_analyzed",
    77. "type": "string"
    78. },
    79. "seq": {
    80. "type": "long"
    81. },
    82. "ts": {
    83. "format": "yyyy-MM-dd$HH:mm:ss.SSS",
    84. "type": "date"
    85. }
    86. }
    87. }
    88. }'