Created
April 13, 2021 16:17
-
-
Save minhphong306/d2d7de9124baf90d26e774e901a1868b to your computer and use it in GitHub Desktop.
removal_type.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT ecommerce | |
{ | |
"mappings": { | |
"_doc": { | |
"properties": { | |
"type": { "type": "keyword" }, // Field đấy đây nài | |
"name": { "type": "text" }, | |
"user_name": { "type": "keyword" }, | |
"email": { "type": "keyword" }, | |
"content": { "type": "text" }, | |
} | |
} | |
} | |
} | |
GET ecommerce/_search | |
{ | |
"query": { | |
"bool": { | |
"must": { | |
"match": { | |
"user_name": "Son Tung M-TP" | |
} | |
}, | |
"filter": { | |
"match": { | |
"type": "session" // Muốn search type gì thì điền vào đây | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment