Skip to content

Instantly share code, notes, and snippets.

@kostromich
Created August 5, 2016 07:33
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 kostromich/b4dabe9b9aba6ee325e52035d76f3dab to your computer and use it in GitHub Desktop.
Save kostromich/b4dabe9b9aba6ee325e52035d76f3dab to your computer and use it in GitHub Desktop.
Example ES query
POST es/ru/_search
{
"query": {
"bool": {
"should": [
{
"multi_match": {
"query": "rings with red zirconia",
"fields": {
"ARTICLE^100",
}
}
},
{
"multi_match": {
"query": "rings with red zirconia",
"fields": {
"CATEGORY_en^80",
}
}
},
{
"nested": {
"path": "INSERT",
"query": {
"multi_match": {
"query": "rings with red round zirconia",
"fields": {
"INSERT_en.NAME^60",
"INSERT_en.COLOR^50",
"INSERT_en.FORM^40",
"INSERT_en.TYPE^30",
}
}
}
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment