elasticsearch6.Xインデックスの作成、マッピング操作

インデックスマッピングを削除する

curl -XDELETE“ http:// localhost:9200 / owner”;
curl -XDELETE“ localhost:9200 / stealth”;
curl -XDELETE“ http:// localhost:9200 / high_intention”;

マッピングを作成する

インデックス所有者

curl -XPUT“ http:// localhost:9200 / owner”;

マッピング

curl -H“ Content-Type:application / json” -XPUT“ http:// localhost:9200 / owner / _mapping / owner” -d '{“ properties”:{“ id”:{“ type”:“ long” 、 "store":true}、 "name":{"type": "keyword"、 "store":true}、 "sex":{"type": "keyword"、 "store":true}、 "age 」:{「type」:「integer」、「store」:true}、「mobile」:{「type」:「keyword」、「store」:true}、「vehicleType」:{「type」:「keyword」 }、 "occupation":{"type": "keyword"、 "store":true}、 "userType":{"type": "keyword"、 "store":true}、 "vin":{"type" :「keyword」、「store」:true}、「address」:{「type」:「keyword」、「store」:true}、「education」:{「type」:「keyword」、「store」:true }、 "familyStatus":{"type": "keyword"、 "store":true}、 "userOrigin":{"type": "keyword"、 "store":true}、 "income":{"type" :「keyword」、「store」:true}、「loanMode」:{「type」:「keyword」、「store」:true}、「buyDate」:{「type」:「date」、「store」:true }、 "buyType":{"type": "keyword"、 "store":true}}} '

潜水艇のインデックス

curl -XPUT“ http:// localhost:9200 / stealth”;
#マッピング
curl -H "Content-Type:application / json" -XPUT "http:// localhost:9200 / stealth / _mapping / stealth" -d '{"properties":{"id":{id "type": "long "、" Store ":true}、" name ":{name" type ":"キーワード "、" store ":true}、" sex ":{gender" type ":" integer "、" store ":true} 、 "Age":{age "type": "integer"、 "store":true}、 "userType":{user type "type": "keyword"、 "store":true}、 "occupation":{occupation "type": "keyword"、 "store":true}、 "address":{province and region "type": "keyword"、 "store":true}、 "education":{education "type": "keyword "、" Store ":true}、" mobile ":{電話番号" type ":"キーワード "、" store ":true}、" userOrigin ":{ユーザーソース" type ":"キーワード "、" store ": true}、 "FamilyStatus":{family status "type": "keyword"、 "store":true}、 "followVehicleType":{Follow Model "type": "keyword"、 "store":true}、 "attemptCarType" :{テストドライブ "type": "boolean"、 "store":true}、 "buyReason":はありますか{購入の理由 "type": "keyword"、 "store":true}、 "carIntention":{車の購入意向 "type": "keyword"、 "store":true}}} ';

インデックスの高い意図

curl -XPUT“ http:// localhost:9200 / high_intention”;

マッピング

curl -H "Content-Type:application / json" -XPUT "http:// localhost:9200 / high_intention / _mapping / high_intention" -d '{"properties":{"id":{ID "type": "long "、" Store ":true}、" name ":{" type ":"キーワード "、" store ":true}、" sex ":{gender" type ":" integer "、" store ":true}、 "Age":{age "type": "integer"、 "store":true}、 "userType":{user type "type": "keyword"、 "store":true}、 "occupation":{occupation " type ":"キーワード "、"ストア ":true}、"アドレス ":{州地域(居住地)"タイプ ":"キーワード "、"ストア ":true}、"教育 ":{教育"タイプ ":"キーワード "、"ストア ":true}、"モバイル ":{電話番号"タイプ ":"キーワード "、"ストア ":true}、"ユーザーオリジン ":{ユーザーソース"タイプ ":"キーワード "、"ストア " :True}、 "familyStatus":{family status "type": "keyword"、 "store":true}、 "followVehicleType":{intentional model "type": "keyword"、 "store":true}、 "attemptCarType ":{テストドライブ"タイプ ":"キーワード "、"ストア ":true}、" buyReason ":{購入の理由 "type": "keyword"、 "store":true}、 "orderModel":{注文するかどうか "type": "keyword"、 "store":true}、 "coupon":{couponクレーム "タイプ": "キーワード"、 "ストア":true}}} ';

おすすめ

転載: blog.csdn.net/qq_38893133/article/details/105068446