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
# Offers at less than 5 kms from Bordeaux | |
GET /products/_search | |
{ | |
"query": { | |
"filtered": { | |
"filter": { | |
"nested": { | |
"path": "offers_store", | |
"filter": { | |
"geo_distance": { |
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
GET /products/_search | |
{ | |
"query": { | |
"multi_match": { | |
"query": "armoire", | |
"type": "most_fields", | |
"fields": [ | |
"title^5", | |
"brand_name^5", | |
"category_name_path^4", |
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
GET /products/_search | |
{ | |
"suggest": { | |
"text": "hocket", | |
"my-suggest-1": { | |
"term": { | |
"field": "title" | |
} | |
}, | |
"my-suggest-2": { |
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
GET /products/_search | |
{ | |
"explain": false, | |
"query": { | |
"filtered": { | |
"query": { | |
"multi_match": { | |
"query": "hochet fille", | |
"type": "most_fields", | |
"fields": [ |
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
GET /products/_search | |
{ | |
"explain": false, | |
"query": { | |
"filtered": { | |
"query": { | |
"multi_match": { | |
"query": "hochet", | |
"type": "best_fields", | |
"fields": [ |
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
GET /products/_search | |
{ | |
"explain": false, | |
"query": { | |
"filtered": { | |
"query": { | |
"multi_match": { | |
"query": "Hochet Personnalisable Chat", | |
"type": "best_fields", | |
"fields": [ |
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
{ | |
"products": { | |
"mappings": { | |
"product": { | |
"properties": { | |
"2": { | |
"type": "string" | |
}, | |
"3": { | |
"type": "string" |
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
PUT /products/_mapping/product | |
{ | |
"product": { | |
"_all": { | |
"enabled": true | |
}, | |
"properties": { | |
"id": { | |
"type": "string" | |
}, |
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
GET /products/_search | |
{ | |
"size": 0, | |
"aggs": { | |
"products": { | |
"terms": { | |
"field": "id", | |
"size": 10 | |
}, | |
"aggs": { |
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
# Results by Cat1 & 2 | |
GET /products/_search | |
{ | |
"query": { | |
"match_all": {} | |
}, | |
"filter":{ | |
}, | |
"aggs": { |
NewerOlder