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
// let -- обычная переменная. если обратиться к ней до объявления -- будет ошибка. | |
console.log(a) // Uncaught ReferenceError: a is not defined | |
let a = 1 | |
console.log(a) // 1 | |
// const -- такая же переменная, защищенная от полной перезаписи. | |
const b = 2 | |
b = 3 // Uncaught TypeError: Assignment to constant variable. | |
// НО! содержимое самой переменной можно изменять, например: |
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
"filter_property_size" => { | |
:terms => { | |
:field => "properties.property_size", | |
:size => 500, | |
:all_terms => false, | |
:script => "properties.base_value" | |
}, |
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
{ | |
:bool => { | |
:must => [ | |
{ | |
:query_string => { | |
:query => "1", | |
:fields => [ | |
"site_id" | |
] | |
} |
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
500 : {"error":"SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[DB1RP73_Q3udL_hmVR7w3Q][24_07_12][3]: SearchParseException[[24_07_12][3]: query[site_id:[1 TO 1]],from[-1],size[-1]: Parse Failure [Failed to parse source [{"query":[{"query_string":{"query":"1","fields":["site_id"]}},{"query_string":{"query":"published","fields":["state"]}},{"match_all":{}},{"mlt_field":{"title":{"like_text":"Land Rover Defender","min_term_freq":1,"min_doc_freq":1,"percent_terms_to_match":0.6}}},{"mlt_field":{"title":{"like_text":"Land Rover Defender","min_term_freq":1,"min_doc_freq":1,"percent_terms_to_match":0.6}}}],"sort":[{"created_at":"desc"}],"facets":{"locations_facet":{"terms":{"field":"location_slug","size":500,"all_terms":false}},"categories_facet":{"terms":{"field":"category_slug","size":500,"all_terms":false}},"seller_types_unfiltered_facet":{"terms":{"field":"seller.type","size":10,"all_terms":false},"facet_filter":null},"seller_types_facet":{"terms":{"field":"seller.typ |
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
{ | |
:bool => { | |
:must => [ | |
[0] { | |
:query_string => { | |
:query => "1", | |
:fields => [ | |
[0] "site_id" | |
] | |
} |