Skip to content

Instantly share code, notes, and snippets.

@sarchak
Created March 5, 2021 17:14
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 sarchak/eb8bdf0c8a3bfffc299e4b0b640b18f1 to your computer and use it in GitHub Desktop.
Save sarchak/eb8bdf0c8a3bfffc299e4b0b640b18f1 to your computer and use it in GitHub Desktop.
{
// "profile":true,
"query": {
"bool": {
"should": [
{
"bool": {
"filter": [
{
"term": {
"retailer_id": 1
}
}
],
"must": [
{
"match": {
"product_name": {
"boost": 2,
"query": "chips"
}
}
}
]
}
},
{
"bool": {
"filter": [
{
"term": {
"retailer_id": 1
}
}
],
"must": [
{
"match": {
"aisle_name": {
// "boost": 2,
"query": "chips"
}
}
}
]
}
},
{
"bool": {
"filter": [
{
"term": {
"retailer_id": 1
}
}
],
"must": [
{
"match": {
"brand_name": {
// "boost": 2,
"query": "chips"
}
}
}
]
}
},
{
"bool": {
"filter": [
{
"term": {
"retailer_id": 1
}
}
],
"must": [
{
"term": {
"categories": {
// "boost": 3,
"term": "chips"
}
}
}
]
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment