detailmapping.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. curl -H 'Content-Type: application/json' -u jybid:Top2023_JEB01i@31 -XPUT http://127.0.0.1:19908/detail_v1 -d '{
  2. "settings": {
  3. "index": {
  4. "analysis": {
  5. "analyzer": {
  6. "my_ngram_title": {
  7. "filter": [
  8. "lowercase"
  9. ],
  10. "tokenizer": "my_ngram_title"
  11. },
  12. "douhao": {
  13. "type": "pattern",
  14. "pattern": ","
  15. },
  16. "my_ngram": {
  17. "filter": [
  18. "lowercase"
  19. ],
  20. "tokenizer": "my_ngram"
  21. }
  22. },
  23. "tokenizer": {
  24. "my_ngram_title": {
  25. "token_chars": [
  26. "letter",
  27. "digit",
  28. "punctuation",
  29. "symbol"
  30. ],
  31. "min_gram": "1",
  32. "type": "nGram",
  33. "max_gram": "1"
  34. },
  35. "my_ngram": {
  36. "token_chars": [
  37. "letter",
  38. "digit",
  39. "punctuation",
  40. "symbol"
  41. ],
  42. "min_gram": "2",
  43. "type": "nGram",
  44. "max_gram": "2"
  45. }
  46. }
  47. },
  48. "number_of_shards": "9",
  49. "number_of_replicas": "0",
  50. "max_result_window": "20000"
  51. }
  52. },
  53. "mappings": {
  54. "dynamic":false,
  55. "properties": {
  56. "detail": {
  57. "analyzer": "my_ngram",
  58. "type": "text"
  59. },
  60. "contenthtml": {
  61. "analyzer": "my_ngram",
  62. "type": "text"
  63. },
  64. "id": {
  65. "type": "keyword"
  66. }
  67. }
  68. }
  69. }'