基于mall4j产品的二开项目后端
edit | blame | history | raw

商品搜索 mapping

PUT product
{
  "mappings" : {
    "properties" : {
      "prodId" : {
        "type" : "long"
      },
      "prodNameZh" : {
        "type" : "text",
        "analyzer" : "ik_max_word",
        "search_analyzer" : "ik_smart"
      },
      "prodNameEn" : {
        "type" : "text",
        "analyzer" : "ik_max_word",
        "search_analyzer" : "ik_smart"
      },
      "briefZh" : {
        "type" : "text",
        "analyzer" : "ik_max_word",
        "search_analyzer" : "ik_smart"
      },
      "briefEn" : {
        "type" : "text",
        "analyzer" : "ik_max_word",
        "search_analyzer" : "ik_smart"
      },
      "commentNum" : {
        "type" : "integer"
      },
      "positiveRating" : {
        "type" : "double"
      },
      "createTime" : {
        "type" : "long"
      }, 
      "updateTime" : {
        "type" : "long"
      },  
      "putawayTime" : {
        "type" : "long"
      }, 
      "activityStartTime" : {
        "type" : "long"
      },    
      "hasStock" : {
        "type" : "boolean"
      },
      "pic" : {
        "type" : "keyword",
        "index" : false,
        "doc_values" : false
      },
      "imgs" : {
        "type" : "keyword"
      },
      "oriPrice" : {
        "type" : "double"
      },
      "price" : {
        "type" : "double"
      },
      "activityPrice" : {
        "type" : "double"
      },
      "activityOriginalPrice" : {
        "type" : "double"
      },
      "scorePrice" : {
        "type" : "double"
      },
      "totalStocks" : {
        "type" : "integer"
      },
      "soldNum" : {
        "type" : "integer"
      },
      "actualSoldNum" : {
        "type" : "integer"
      },
      "waterSoldNum" : {
        "type" : "integer"
      },
      "prodType" : {
        "type" : "integer"
      },
      "status" : {
        "type" : "integer"
      },
      "activityId" : {
        "type" : "long"
      },  
      "mold" : {
        "type" : "integer"
      },
      "seq" : {
        "type" : "integer"
      },
      "isTop": {
        "type" : "integer"
      },
      "deliveryMode" : {
        "type" : "keyword"
      },
      "deliveries": {
        "type" : "integer"
      },
      "shopId" : {
        "type" : "long"
      },
      "shopName" : {
        "type" : "text",
        "analyzer" : "ik_max_word",
        "search_analyzer" : "ik_smart"
      },
      "shopType" : {
        "type" : "integer"
      },
      "primaryCategoryId" : {
        "type" : "long"
      },
      "secondaryCategoryId" : {
        "type" : "long"
      },
      "category" : {
        "type" : "nested",
        "properties" : {
            "categoryId" : {
              "type" : "long"
            },
            "categoryNameZh" : {
              "type" : "keyword"
            },
            "categoryNameEn" : {
              "type" : "keyword"
            }
        }
      },
      "shopCategoryId" : {
        "type" : "long"
      },
      "spuStatus" : {
        "type" : "integer"
      },
      "appDisplay" : {
        "type" : "boolean"
      },
      "preSellStatus" : {
        "type" : "integer"
      },
      "preSellTime" : {
        "type" : "long"
      },
      "brand" : {
        "type" : "nested",
        "properties" : {
           "brandId" : {
             "type" : "long"
           },
           "brandImg" : {
             "type" : "keyword"
           },
          "brandNameZh" : {
            "type" : "keyword"
          },
           "brandNameEn" : {
            "type" : "keyword"
          }
        }
      }
    }
  }
}