curl --location --request GET 'http://192.168.36.90/search/epa/main/_search' \
--header 'Content-Type: application/json' \
--data-raw '{
"from": 0,
"size": 24,
"query": {
"function_score": {
"boost_mode": "replace",
"functions": [
{
"script_score": {
"params": {
"factor": 1.1,
"now": 1596725731
},
"script": [
"factor * (1 + (10-log(1 + 0.00024 * abs(now - doc['\''__updated_at'\''].value))))"
]
}
},
{
"script_score": {
"params": {
"factor": 1.2
},
"script": [
"factor * log(1 + 0.06 * doc['\''price'\''].value)"
]
}
},
{
"script_score": {
"params": {
"factor": 1.05
},
"script": [
"factor * (10 - log(1 + 37 * doc['\''ship_price'\''].value))"
]
}
},
{
"script_score": {
"params": {
"factor": 1.2
},
"script": [
"factor * log(1 + 25 * doc['\''sell_count'\''].value)"
]
}
},
{
"script_score": {
"params": {
"factor": 1.2
},
"script": [
"factor * log(1 + 0.001 * doc['\''stock'\''].value)"
]
}
},
{
"script_score": {
"params": {
"factor": 2
},
"script": [
"factor * doc['\''discount'\''].value \/ 10"
]
}
},
{
"script_score": {
"script": [
"-1 * (1000 * sqrt(doc['\''evo_category.id'\''].value))"
]
}
},
{
"script_score": {
"script": [
"_score"
]
}
}
],
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"term": {
"shop_active": true
}
},
{
"term": {
"active": true
}
},
{
"range": {
"price": {
"from": 0.99
}
}
},
{
"range": {
"stock": {
"from": 1
}
}
},
{
"range": {
"evo_category.id": {
"gt": 0
}
}
}
],
"must_not": [
{
"term": {
"image_passive": true
}
}
]
}
},
"query": {
"bool": {
"should": [
{
"match": {
"name": "mayk ayakkabı"
}
}
],
"minimum_should_match": "100%"
}
}
}
},
"score_mode": "avg"
}
},
"sort": [
{
"_score": {
"order": "desc"
}
}
],
"aggs": {
"attributes": {
"aggs": {
"attribute_values": {
"terms": {
"field": "evo_attributes.values.key_value"
}
}
},
"terms": {
"field": "evo_attributes.key_value"
}
},
"category": {
"terms": {
"order": {
"_term": "asc"
},
"script": "doc['\''evo_category.breadcrumb_url_text'\''].value + '\''||'\'' + doc['\''evo_category.breadcrumb_text'\''].value",
"size": 500
}
}
}
}'
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}