Skip to content

Instantly share code, notes, and snippets.

@bubuzzz
Created July 25, 2017 02:34
Show Gist options
  • Save bubuzzz/22a8a142f199b2a80b8675cfed8bfe64 to your computer and use it in GitHub Desktop.
Save bubuzzz/22a8a142f199b2a80b8675cfed8bfe64 to your computer and use it in GitHub Desktop.
{
"order": 0,
"template": "meteor",
"settings": {
"index": { "number_of_shards": "1" }
},
"mappings": {
"Variable": {
"_source": { "enabled": true },
"properties": {
"caseId": { "index": "not_analyzed", "store": true, "type": "string" },
"caseName": { "index": "not_analyzed", "store": true, "type": "string" },
"caseType": { "index": "not_analyzed", "store": true, "type": "string" }
}
},
"ClosedVariable": {
"_source": { "enabled": true },
"properties": {
"caseId": { "index": "not_analyzed", "store": true, "type": "string" },
"caseName": { "index": "not_analyzed", "store": true, "type": "string" },
"caseType": { "index": "not_analyzed", "store": true, "type": "string" }
}
}
}
}
{
"query": {
"bool": {
"should": [
{
"regexp": {
"caseId.search": ".*case.*"
}
},
{
"regexp": {
"caseName.search": ".*case.*"
}
},
{
"regexp": {
"tags.search": ".*case.*"
}
}
],
"must": {
"match": {
"identifier.type": "CaseDetails"
}
},
"must_not": {
"match": {
"caseType": "CRM"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment