Skip to content

Instantly share code, notes, and snippets.

@minhphong306
Created April 13, 2021 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minhphong306/d2d7de9124baf90d26e774e901a1868b to your computer and use it in GitHub Desktop.
Save minhphong306/d2d7de9124baf90d26e774e901a1868b to your computer and use it in GitHub Desktop.
removal_type.js
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