在elasticsearch中,根据商品名称查询时,没有数据。
创新互联建站专业IDC数据服务器托管提供商,专业提供成都服务器托管,服务器租用,成都移动机房,成都移动机房,成都多线服务器托管等服务器托管服务。
折腾了一天 ,最后将商品名称字段不分词进行索引。
{
"mappings": {
"type_product":
{ "properties": {
"type_product_brandId": {
"type": "string"
},
"type_product_businessId": {
"type": "string"
},
"type_product_catalogId": {
"type": "string"
},
"type_product_classifyIds": {
"type": "string"
},
"type_product_createdAt": {
"type": "long"
},
"type_product_delAt": {
"type": "long"
},
"type_product_description": {
"type": "string"
},
"type_product_downAt": {
"type": "long"
},
"type_product_highPrice": {
"type": "long"
},
"type_product_id": {
"type": "string"
},
"type_product_integralPrice": {
"type": "long"
},
"type_product_isWeekReturn": {
"type": "string"
},
"type_product_listInventory": {
"properties": {
"amount": {
"type": "long"
},
"barCode": {
"type": "string"
},
"code": {
"type": "string"
},
"pictures": {
"type": "string"
},
"price": {
"type": "long"
},
"productId": {
"type": "string"
},
"sku": {
"type": "string"
},
"specs": {
"type": "string"
},
"specsName": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"type_product_lm": {
"properties": {
"createdAt": {
"type": "long"
},
"datatype": {
"type": "string"
},
"id": {
"type": "string"
},
"imgUrl": {
"type": "string"
},
"name": {
"type": "string"
},
"pid": {
"type": "string"
},
"productPageDetail": {
"type": "string"
},
"sort": {
"type": "long"
}
}
},
"type_product_lowPrice": {
"type": "long"
},
"type_product_mainPicture": {
"type": "string"
},
"type_product_pictures": {
"type": "string"
},
"type_product_producerId": {
"type": "string"
},
"type_product_productChannel": {
"type": "string"
},
"type_product_productGrade": {
"type": "string"
},
"type_product_productPoints": {
"type": "long"
},
"type_product_productType": {
"type": "string"
},
"type_product_promotions": {
"properties": {
"boughtCount": {
"type": "long"
},
"createAt": {
"type": "long"
},
"createrDatatype": {
"type": "string"
},
"createrDepartmentId": {
"type": "string"
},
"createrDepartmentLayer": {
"type": "long"
},
"createrDepartmentLeftvalue": {
"type": "long"
},
"createrDepartmentRightvalue": {
"type": "long"
},
"createrId": {
"type": "string"
},
"failureAt": {
"type": "long"
},
"giftCount": {
"type": "long"
},
"name": {
"type": "string"
},
"promotionGive": {
"properties": {
"price": {
"type": "string"
},
"productName": {
"type": "string"
},
"productPic": {
"type": "string"
},
"productSpec": {
"type": "string"
},
"promotionGiveId": {
"type": "string"
},
"promotionId": {
"type": "string"
},
"promotionProductId": {
"type": "string"
}
}
},
"promotionId": {
"type": "string"
},
"promotionType": {
"type": "string"
},
"remark": {
"type": "string"
},
"startAt": {
"type": "long"
},
"status": {
"type": "string"
}
}
},
"type_product_propertis": {
"type": "string"
},
"type_product_rebatePrice": {
"type": "long"
},
"type_product_salesVolume": {
"type": "long"
},
"type_product_sign": {
"type": "string"
},
"type_product_specs": {
"type": "string"
},
"type_product_status": {
"type": "string"
},
"type_product_subTitle": {
"type": "string"
},
"type_product_title": {
"type": "string",
"index":"not_analyzed"
},
"type_product_totalVolume": {
"type": "long"
},
"type_product_universalPrice": {
"type": "long"
},
"type_product_upAt": {
"type": "long"
},
"type_product_visitorVolume": {
"type": "long"
}
}
}
}}
查询条件:
{"query":{"bool":{"must":[{"wildcard":{ "type_product_title":"*8度*"}}]}}}
网站栏目:elasticsearchs中文查询返回为空问题
网页地址:https://www.cdcxhl.com/article24/ijcdce.html
成都网站建设公司_创新互联,为您提供响应式网站、网站维护、微信公众号、企业建站、定制开发、网站设计
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联