Last active
April 26, 2019 10:41
-
-
Save prashanttct07/fd3b83973ec36c71a65e1b3b03ee3cb9 to your computer and use it in GitHub Desktop.
Main query without category filter
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
{ | |
"sort": [ | |
"_score", | |
{ | |
"catalog.unitPrice": "asc" | |
} | |
], | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"multi_match": { | |
"query": "Gloves small powder free", | |
"type": "phrase_prefix", | |
"fields": [ | |
"sizes.whitespace" | |
], | |
"boost": 10 | |
} | |
}, | |
{ | |
"multi_match": { | |
"query": "Gloves small powder free", | |
"type": "phrase", | |
"fields": [ | |
"sizes.whitespace" | |
], | |
"slop": 3, | |
"boost": 8 | |
} | |
}, | |
{ | |
"multi_match": { | |
"query": "Gloves small powder free", | |
"type": "best_fields", | |
"fields": [ | |
"sizes.whitespace" | |
], | |
"boost": 8 | |
} | |
}, | |
{ | |
"multi_match": { | |
"query": "Gloves small powder free", | |
"type": "phrase_prefix", | |
"fields": [ | |
"catalog.itemDescription", | |
"catalog.productName", | |
"catalog.manufacturerName", | |
"catalog.productDescription" | |
], | |
"boost": 5 | |
} | |
}, | |
{ | |
"multi_match": { | |
"query": "Gloves small powder free", | |
"type": "phrase", | |
"fields": [ | |
"catalog.itemDescription", | |
"catalog.productName", | |
"catalog.manufacturerName", | |
"catalog.productDescription" | |
], | |
"slop": 3 | |
} | |
}, | |
{ | |
"multi_match": { | |
"query": "Gloves small powder free", | |
"type": "best_fields", | |
"fields": [ | |
"catalog.itemDescription", | |
"catalog.productName", | |
"catalog.manufacturerName", | |
"catalog.productDescription" | |
] | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment