{"id":319970,"date":"2021-03-21T09:00:10","date_gmt":"2021-03-21T09:00:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=319970"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=319970","title":{"rendered":"\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c: \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0438 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sd\/vz\/ke\/sdvzkeyjgv9cvnvqvq9xvcuj3sw.jpeg\"><\/div>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0431\u044c\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043f\u043b\u0430\u043c\u0435\u043d\u043d\u043e\u0435 \u0441\u0435\u0440\u0434\u0446\u0435 \u2014 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u0418\u043c\u0435\u043d\u043d\u043e \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u0432\u0441\u0451 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0438 \u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0442\u0438\u043a\u0430\u043c\u0438, \u043e\u0442\u0432\u0435\u0442\u0430\u043c \u0441 StackOverflow \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430\u043c \u043d\u0430 \u0432\u0438\u043a\u0438.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0441 \u043e\u0442\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043a \u0442\u0435\u043e\u0440\u0438\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u043e\u043f\u044b\u0442\u043d\u043e\u0433\u043e \u043a\u0440\u043e\u043b\u0438\u043a\u0430 \u0432\u0437\u044f\u0442 <a href=\"https:\/\/github.com\/tantivy-search\/tantivy\" rel=\"nofollow noopener noreferrer\">Tantivy<\/a> \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Lucene \u043d\u0430 Rust. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439, \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u0441 \u0440\u0430\u0441\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u043d\u044b\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u0445\u0430\u0431\u0440\u0430 \u0437\u0430 \u0447\u0430\u0448\u043a\u043e\u0439 \u043a\u043e\u0444\u0435, \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e!<a name=\"habracut\"><\/a>  <\/p>\n<hr>\n<p>  \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438: \u0435\u0441\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0445\u043e\u0442\u0438\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043d\u0430\u0431\u043e\u0440 \u043d\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u043f\u0440\u0438\u0447\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443. \u0412\u0442\u043e\u0440\u044b\u043c \u0448\u0430\u0433\u043e\u043c <s>\u0434\u043e\u0440\u0438\u0441\u0443\u0435\u043c \u0441\u043e\u0432\u0443<\/s> \u043d\u0430\u0439\u0434\u0435\u043c K \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u041d\u0443 \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e.<\/p>\n<h2><font color=\"#cc0000\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438<\/font><\/h2>\n<p>  \u041d\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u00ab\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c\u00bb \u2014 \u044d\u0442\u043e \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u044f \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0438\u0437 \u043c\u0438\u0440\u0430 \u043b\u044e\u0434\u0435\u0439 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u0437 \u043c\u0438\u0440\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438. \u0422\u043e\u0433\u0434\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0435\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442-\u0432\u0435\u043a\u0442\u043e\u0440 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441-\u0432\u0435\u043a\u0442\u043e\u0440 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0431\u043b\u0438\u0437\u043a\u043e. \u041f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u0437\u043e\u0432\u0451\u0442\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/836\/e59\/247\/836e59247dee9dc566df40f0f1d606e8.svg\" alt=\"$V$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/836\/e59\/247\/836e59247dee9dc566df40f0f1d606e8.svg\" alt=\"$V$\" data-tex=\"inline\"><\/math>. \u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c\u0438, \u043b\u0438\u0448\u044c \u0431\u044b \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u0432 \u0431\u043b\u0438\u0437\u043a\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430.<\/p>\n<p>  <a href=\"https:\/\/towardsdatascience.com\/document-embedding-techniques-fed3e7a6a25d\" rel=\"nofollow noopener noreferrer\">\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/a> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e \u0449\u0435\u043b\u0447\u043a\u0443 \u043f\u0430\u043b\u044c\u0446\u0435\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435. \u0412 \u0442\u0430\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0432\u0441\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0442 \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430: \u0442\u0435\u043c\u0443, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435, \u0434\u043b\u0438\u043d\u0443, \u043b\u0435\u043a\u0441\u0438\u043a\u0443 \u0438\u043b\u0438 \u043b\u044e\u0431\u0443\u044e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044e \u044d\u0442\u0438\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0442\u043e, \u0447\u0442\u043e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430, \u043d\u0435\u0432\u044b\u0440\u0430\u0437\u0438\u043c\u043e \u043d\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0437\u0430\u0442\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u041d\u0435\u0445\u0438\u0442\u0440\u044b\u0439 \u043f\u043b\u0430\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430:<\/p>\n<ul>\n<li>\u0411\u0435\u0440\u0435\u043c \u043b\u044e\u0431\u0438\u043c\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/fasttext.cc\/\" rel=\"nofollow noopener noreferrer\">fastText<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/github.com\/google-research\/bert\" rel=\"nofollow noopener noreferrer\">BERT<\/a>, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0430<\/li>\n<li>\u0421\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0432 \u043b\u044e\u0431\u0438\u043c\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 K \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 (k-NN) \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 <a href=\"https:\/\/github.com\/facebookresearch\/faiss\" rel=\"nofollow noopener noreferrer\">faiss<\/a><\/li>\n<li>\u041f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432 \u0432\u0435\u043a\u0442\u043e\u0440 \u0442\u0435\u043c \u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c, \u0447\u0442\u043e \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b<\/li>\n<li>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0443-\u0432\u0435\u043a\u0442\u043e\u0440\u0443 \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b\u00a0<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0438\u0441\u043a, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 k-NN, \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0437\u0430\u0441\u0443\u043d\u0443\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0432\u0435\u0441\u044c \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0441\u0443\u0437\u0438\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0441\u0442\u0430\u043b\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0449\u0435.\u00a0<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u043c\u0438 \u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u0441\u043b\u043e\u0432 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0438\u0437 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0418\u043b\u0438 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u00ab\u0432\u0430\u0436\u043d\u044b\u0435\u00bb \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0445\u043e\u043b\u043e\u0449\u0435\u043d\u043d\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0435\u0440\u0432\u044b\u0445 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. <\/p>\n<p>  <i>NB.: \u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u00ab\u0441\u043b\u043e\u0432\u0430\u00bb \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u00ab\u0442\u0435\u0440\u043c\u0430\u043c\u0438\u00bb \u0441 \u0446\u0435\u043b\u044c\u044e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u044f \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u044b<\/i><\/p>\n<p>  \u0417\u0430\u043f\u0438\u0448\u0435\u043c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0434\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c:<\/p>\n<ul>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0443<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043e\u0434\u043d\u043e\u043c\u0443 \u0442\u0435\u0440\u043c\u0443<\/li>\n<\/ul>\n<p>  \u041d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u043d\u0430\u043b\u043e\u0436\u0438\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0430\u0434\u0434\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u0432\u044b\u0440\u0430\u0437\u0438\u043c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 \u0441\u0443\u043c\u043c\u0443 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0435\u0440\u043c\u043e\u0432: <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d06\/77c\/987\/d0677c987e8c4b7e37c05a0cb32ad882.svg\" alt=\"$score(q, d)=\\sum_{t \\in q}score(t, d)$\" data-tex=\"display\"><\/math><\/p>\n<p> \u0410\u0434\u0434\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043d\u043e \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u043d\u0430\u0441 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u0438\u043b\u044c\u043d\u044b\u043c \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u0431\u0443\u0434\u0442\u043e \u0431\u044b \u0432\u0441\u0435 \u0441\u043b\u043e\u0432\u0430 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/Bag-of-words_model\" rel=\"nofollow noopener noreferrer\">\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430<\/a>.<\/p>\n<p>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0430\u0434\u0434\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u2014 TF-IDF \u0438 BM25. \u041e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3><font color=\"#cc0000\">\u041e\u0442\u043a\u0443\u0434\u0430 \u0432\u0437\u044f\u043b\u0438\u0441\u044c TF-IDF \u0438 BM25<\/font><\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0442\u043e \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>  \u0418 TF-IDF, \u0438 BM25 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043e\u0434\u043d\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c. \u0427\u0435\u043c \u0432\u044b\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u0435\u043d \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u0421\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0438. \u0412\u0430\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u0434\u0438\u043d \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u0435\u043d \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u0444\u043e\u0440\u043c\u0443\u043b \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u0430\u043f\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f TF-IDF \u0438 BM25. \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math>. \u0421\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0432\u043d\u043e\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0442\u0435\u0440\u043c\u0430 (termFrequency \u0438\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/93d\/5b2\/981\/93d5b2981a626e7d042bd2fcb5213393.svg\" alt=\"$tf$\" data-tex=\"inline\"><\/math>) \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442: <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f2c\/db5\/760\/f2cdb5760830090421dc245dfdbf87fe.svg\" alt=\"$score(t, d)=tf(t, d)$\" data-tex=\"display\"><\/math><\/p>\n<p> \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435 \u043e\u0434\u0438\u043d \u0442\u0435\u0440\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b0\/012\/4e4\/9b00124e411362185d05b841bc32695f.svg\" alt=\"$t$\" data-tex=\"inline\"><\/math>, \u0430 \u0437\u0430\u043f\u0440\u043e\u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d68\/cc4\/926\/d68cc4926bf74bae8fa3b51ca4a09ec8.svg\" alt=\"$q$\" data-tex=\"inline\"><\/math>, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u0440\u043c\u043e\u0432, \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430? \u0412\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u043f\u0440\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0430\u0434\u0434\u0438\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math> \u043f\u043e \u0442\u0435\u0440\u043c\u0430\u043c \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430: <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d06\/77c\/987\/d0677c987e8c4b7e37c05a0cb32ad882.svg\" alt=\"$score(q, d)=\\sum_{t \\in q}score(t, d)$\" data-tex=\"display\"><\/math><\/p>\n<p> \u0412 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0432\u044b\u0448\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043c\u044b \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u0443\u044e \u00ab\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u00bb \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0435\u0440\u043c\u043e\u0432. \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u00abcat and dog\u00bb, \u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u043c\u0438 \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c 100500 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0442\u0435\u0440\u043c\u0430 \u00aband\u00bb. \u0412\u0440\u044f\u0434 \u043b\u0438 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>  \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u0432\u0437\u0432\u0435\u0448\u0438\u0432\u0430\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0440\u043c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0435\u0433\u043e \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c\u044e: <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/de7\/643\/3f3\/de76433f342758c004deb16645d08825.svg\" alt=\"$score(t, d)=\\frac{tf(t, d)}{df(t)}$\" data-tex=\"display\"><\/math><\/p>\n<p> <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/797\/4ff\/1ec7974ff27c89f16eba2f021f21bd89.svg\" alt=\"$df(t)$\" data-tex=\"inline\"><\/math> \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0442\u0435\u0440\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b0\/012\/4e4\/9b00124e411362185d05b841bc32695f.svg\" alt=\"$t$\" data-tex=\"inline\"><\/math>. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0447\u0435\u043c \u0447\u0430\u0449\u0435 \u0442\u0435\u0440\u043c \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f, \u0442\u0435\u043c \u043c\u0435\u043d\u0435\u0435 \u043e\u043d \u0432\u0430\u0436\u0435\u043d \u0438 \u0442\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math>. \u0422\u0435\u0440\u043c\u044b \u0432\u0440\u043e\u0434\u0435 \u00aband\u00bb \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/797\/4ff\/1ec7974ff27c89f16eba2f021f21bd89.svg\" alt=\"$df(t)$\" data-tex=\"inline\"><\/math> \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math>.\u00a0<\/p>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u0443\u0436\u0435 \u043b\u0443\u0447\u0448\u0435, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/797\/4ff\/1ec7974ff27c89f16eba2f021f21bd89.svg\" alt=\"$df(t)$\" data-tex=\"inline\"><\/math> \u043c\u0430\u043b\u043e \u043e \u0447\u0451\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442. \u0415\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b99\/02a\/cd1\/b9902acd1d660b447bb9e4cacafdeec7.svg\" alt=\"$df(\u0436\u0438\u0440\u0430\u0444) = 100$\" data-tex=\"inline\"><\/math>, \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u2014 100 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u0442\u0435\u0440\u043c \u00ab\u0436\u0438\u0440\u0430\u0444\u00bb \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u044b\u043c. \u0410 \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 100 000, \u0442\u043e \u0443\u0436\u0435 \u0440\u0435\u0434\u043a\u0438\u043c. <\/p>\n<p>  \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/797\/4ff\/1ec7974ff27c89f16eba2f021f21bd89.svg\" alt=\"$df(t)$\" data-tex=\"inline\"><\/math> \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0431\u0440\u0430\u043d\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/797\/4ff\/1ec7974ff27c89f16eba2f021f21bd89.svg\" alt=\"$df(t)$\" data-tex=\"inline\"><\/math> \u0432 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043f\u0443\u0442\u0435\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1e8\/0c3\/b30\/1e80c3b3087c0a57b68ad11261a9ec2b.svg\" alt=\"$N$\" data-tex=\"inline\"><\/math>: <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4df\/942\/6a1\/4df9426a1006fd892c8b2f1e7742aaab.svg\" alt=\"$score(t, d)=\\frac{tf(t, d)}{\\frac{df(t)}{N}}=tf(t, d)\\frac{N}{df(t)}$\" data-tex=\"display\"><\/math><\/p>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u2014 \u0443 \u043d\u0430\u0441 100 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u0442\u0435\u0440\u043c \u00ab\u0441\u043b\u043e\u043d\u00bb, \u0432 \u0434\u0432\u0443\u0445 \u2014 \u00ab\u0436\u0438\u0440\u0430\u0444\u00bb.\u00a0 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6f8\/236\/533\/6f8236533d84c8afa7aeb8a4d6b02213.svg\" alt=\"$\\frac{N}{df(t)}$\" data-tex=\"inline\"><\/math> \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e 100, \u0430 \u0432\u043e-\u0432\u0442\u043e\u0440\u043e\u043c \u2014 50. \u0422\u0435\u0440\u043c \u00ab\u0436\u0438\u0440\u0430\u0444\u00bb \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0447\u043a\u043e\u0432, \u0447\u0435\u043c \u0442\u0435\u0440\u043c \u00ab\u0441\u043b\u043e\u043d\u00bb \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0438\u0448\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0436\u0438\u0440\u0430\u0444\u043e\u043c \u043d\u0430 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441\u043e \u0441\u043b\u043e\u043d\u043e\u043c. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0441\u0433\u043b\u0430\u0434\u0438\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6f8\/236\/533\/6f8236533d84c8afa7aeb8a4d6b02213.svg\" alt=\"$\\frac{N}{df(t)}$\" data-tex=\"inline\"><\/math>. <\/p>\n<p>  \u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c: <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/39b\/1a2\/594\/39b1a25949a7e8e64e7d118c636965c0.svg\" alt=\"$score(t, d) = tf(t, d)\\log\\frac{N}{df(t)}$\" data-tex=\"display\"><\/math><\/p>\n<p> \u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 TF-IDF. \u0415\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435 \u043a BM25.<\/p>\n<p>  \u0412\u0440\u044f\u0434 \u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0442\u0435\u0440\u043c \u00ab\u0436\u0438\u0440\u0430\u0444\u00bb 200 \u0440\u0430\u0437 \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0442\u0435\u0440\u043c \u00ab\u0436\u0438\u0440\u0430\u0444\u00bb 100 \u0440\u0430\u0437. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0442\u0443\u0442 \u043f\u0440\u043e\u0435\u0434\u0435\u043c\u0441\u044f \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043d\u0435 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0430 \u0447\u0443\u0442\u044c \u0438\u043d\u0430\u0447\u0435. \u0417\u0430\u043c\u0435\u043d\u0438\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/299\/36b\/08d29936b136916db6188ce107fdbd34.svg\" alt=\"$tf(t, d)$\" data-tex=\"inline\"><\/math> \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e54\/4e7\/8fe\/e544e78fe69ab57045252c81ce5873b6.svg\" alt=\"$tf_s(t, d) = \\frac{tf(t, d)}{tf(t, d) + k}$\" data-tex=\"inline\"><\/math> \u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0447\u0438\u0441\u043b\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043c\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/299\/36b\/08d29936b136916db6188ce107fdbd34.svg\" alt=\"$tf(t, d)$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/733\/aea\/808\/733aea8089a01d3b97ff535d150ff9e5.svg\" alt=\"$tf_s(t, d)$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0438\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432\u0441\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u0430. \u0410 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0440\u0438\u0432\u0438\u0437\u043d\u0443 \u044d\u0442\u043e\u0433\u043e \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f. \u0413\u043e\u0432\u043e\u0440\u044f \u043f\u043e-\u0443\u043c\u043d\u043e\u043c\u0443, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0430\u0442\u0443\u0440\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gc\/qs\/sp\/gcqssps36boy_gcstlfvcp57ux4.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 0: \u0427\u0435\u043c \u0432\u044b\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math>, \u0442\u0435\u043c \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0442\u0435\u0440\u043c\u0430.<\/font><\/i><\/p>\n<p>  \u0423 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/733\/aea\/808\/733aea8089a01d3b97ff535d150ff9e5.svg\" alt=\"$tf_s(t, d)$\" data-tex=\"inline\"><\/math> \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0430. <\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0432\u0441\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0447\u0435\u043c \u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0432\u043e \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437. \u0422\u043e\u043f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c \u0433\u043b\u0430\u0437 \u0438 \u0443\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432\u0435\u0434\u044c \u0432\u0441\u0435 \u0442\u0435\u0440\u043c\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0435\u0447\u0430\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a.<\/p>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/733\/aea\/808\/733aea8089a01d3b97ff535d150ff9e5.svg\" alt=\"$tf_s(t, d)$\" data-tex=\"inline\"><\/math> \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0441\u0432\u0435\u0440\u0445\u0443. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math> \u0442\u043e\u0436\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0441\u0432\u0435\u0440\u0445\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0432\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math> \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0440\u0445\u0443 (\u0434\u0430\u043b\u0435\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u2014 upper bound). \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c. <\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441? <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0432\u043a\u043b\u0430\u0434\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438. \u0415\u0441\u043b\u0438 \u043c\u044b \u0437\u043d\u0430\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u0440\u0435\u0437\u0430\u0442\u044c \u0443\u0433\u043b\u044b \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u2014 \u043d\u0430\u0447\u043d\u0435\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math>. \u0412 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 \u0442\u0435\u0440\u043c \u00ab\u0436\u0438\u0440\u0430\u0444\u00bb \u043c\u043e\u0436\u0435\u0442 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e-\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0441\u0442\u0438 \u0438 \u0435\u0433\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0442 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u0435\u043c\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u0410 \u0432\u043e\u0442 \u0435\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 \u0438 \u044d\u0442\u043e \u0442\u0435\u0440\u043c \u00ab\u0436\u0438\u0440\u0430\u0444\u00bb, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043e \u0436\u0438\u0440\u0430\u0444\u0430\u0445. <\/p>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0447\u0435\u0441\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u2014 \u0432\u0437\u044f\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0432 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/249\/753\/480\/24975348062c421f3110913d74106781.svg\" alt=\"$dl(d)$\" data-tex=\"inline\"><\/math>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/249\/753\/480\/24975348062c421f3110913d74106781.svg\" alt=\"$dl(d)$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0432 \u0432\u043e \u0432\u0441\u0435\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/56a\/7e8\/421\/56a7e842118f6170aaa745db8ca0db11.svg\" alt=\"$dl_{avg}$\" data-tex=\"inline\"><\/math>. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043c\u044b \u044d\u0442\u043e \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0442\u0435\u0445 \u0436\u0435 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0438\u0437 \u043a\u0430\u043a\u0438\u0445 \u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/797\/4ff\/1ec7974ff27c89f16eba2f021f21bd89.svg\" alt=\"$df(t)$\" data-tex=\"inline\"><\/math> \u0432\u044b\u0448\u0435 \u2014 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u044f\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0442\u0440\u0438\u043a\u0438. <\/p>\n<p>  \u041d\u0430\u0439\u0434\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0434\u043b\u0438\u043d\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435. \u041a\u043e\u0433\u0434\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u0440\u0430\u0441\u0442\u0435\u0442, \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f73\/4af\/cd3\/f734afcd329f602cab46015548d00ec6.svg\" alt=\"$tf_s$\" data-tex=\"inline\"><\/math> \u043f\u0430\u0434\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u043c\u043d\u043e\u0436\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/468\/8c5\/a3c\/4688c5a3cec4fbb7d7f43b5797ddce6f.svg\" alt=\"$\\frac{dl(d)}{dl_{avg}}$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math>. \u0422\u043e \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e!<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043b\u0443, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445. \u0417\u0430\u043c\u0435\u043d\u0438\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/468\/8c5\/a3c\/4688c5a3cec4fbb7d7f43b5797ddce6f.svg\" alt=\"$\\frac{dl(d)}{dl_{avg}}$\" data-tex=\"inline\"><\/math> \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/516\/1f2\/046\/5161f2046c47cfb3fe5043e245d23b83.svg\" alt=\"$1 \u2013 b + b\\frac{dl(d)}{dl_{avg}}$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c: <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/aa5\/ea3\/0ca\/aa5ea30ca22d274a2911e9657c2551a2.svg\" alt=\"$\\frac{tf_s(t, d)}{tf_s(t, d) + k(1 - b + b\\frac{dl(d)}{dl_{avg}})}$\" data-tex=\"display\"><\/math><\/p>\n<p> \u041f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8ec\/4ca\/ae8\/8ec4caae8d46f38657f9872e9c416c61.svg\" alt=\"$b = 0$\" data-tex=\"inline\"><\/math> \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u0432\u044b\u0440\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5c8\/213\/5ba\/5c82135ba8e076cf2a486cc62b51cb57.svg\" alt=\"$\\frac{tf_s(t, d)}{tf_s(t, d) + k}$\" data-tex=\"inline\"><\/math>, \u0430 \u043f\u0440\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2c3\/2a1\/c50\/2c32a1c507ce943674abc0ea47d3249a.svg\" alt=\"$b = 1$\" data-tex=\"inline\"><\/math> \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0438\u0434 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d5f\/ebb\/c5b\/d5febbc5be3682c68591892027432476.svg\" alt=\"$\\frac{tf_s(t, d)}{tf_s(t, d) + k\\frac{dl(d)}{dl_{avg}}}$\" data-tex=\"inline\"><\/math>.\u00a0<\/p>\n<p>  \u0415\u0449\u0451 \u0440\u0430\u0437: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u2014 \u0441\u0438\u043b\u0430 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0442\u0435\u0440\u043c\u043e\u0432 \u043d\u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/302\/c72\/04e\/302c7204ea9987e698a70307646abd71.svg\" alt=\"$b$\" data-tex=\"inline\"><\/math> \u2014 \u0441\u0438\u043b\u0430 \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u0434\u043b\u0438\u043d\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/93d\/5b2\/981\/93d5b2981a626e7d042bd2fcb5213393.svg\" alt=\"$tf$\" data-tex=\"inline\"><\/math> \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f73\/4af\/cd3\/f734afcd329f602cab46015548d00ec6.svg\" alt=\"$tf_s$\" data-tex=\"inline\"><\/math>:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b15\/5b5\/14a\/b155b514a66fcad54f4aa9922fb27ac8.svg\" alt=\"$score(q, d)=\\sum_{t \\in q} \\frac{tf(t, d) (k + 1)}{tf(t, d) + k(1 - b + b\\frac{dl(d)}{dl_{avg}})} * \\log\\frac{N}{df(t)}$\" data-tex=\"display\"><\/math><\/p>\n<p> \u0423 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0430 BM25 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043d\u044e\u0430\u043d\u0441\u043e\u043c. \u0412 \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b27\/d71\/24d\/b27d7124d518f5f7d725fea4743ba304.svg\" alt=\"$\\log\\frac{N}{df(t)}$\" data-tex=\"inline\"><\/math> (\u044d\u0442\u043e\u0442 \u0447\u043b\u0435\u043d \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/454\/bcf\/223\/454bcf2237969471e1a67da0a080eb41.svg\" alt=\"$IDF$\" data-tex=\"inline\"><\/math>) \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ad\/696\/432\/0ad696432500a812b8681cce2fa43c0a.svg\" alt=\"$\\log\\frac{N - df(t) + 0.5}{df(t) + 0.5}$\" data-tex=\"inline\"><\/math>. \u0417\u0430\u043c\u0435\u043d\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a \u043f\u043e\u0434 \u0441\u043e\u0431\u043e\u0439 \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043f\u043e\u0434\u0433\u043e\u043d\u043a\u0435 \u043f\u043e\u0434 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u043e\u043b\u0435\u0435 \u0447\u0438\u0441\u0442\u0443\u044e \u0444\u043e\u0440\u043c\u0443 <a href=\"https:\/\/t.me\/libgen_scihub_bot?start=TklEOiA3NDMwNTc4NQ==\" rel=\"nofollow noopener noreferrer\">RSJ \u043c\u043e\u0434\u0435\u043b\u0438<\/a>. \u0422\u0430\u043a\u0430\u044f \u0444\u043e\u0440\u043c\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/454\/bcf\/223\/454bcf2237969471e1a67da0a080eb41.svg\" alt=\"$IDF$\" data-tex=\"inline\"><\/math> \u0434\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u0432\u0435\u0441 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0442\u0435\u0440\u043c\u0430\u043c: \u0430\u0440\u0442\u0438\u043a\u043b\u044f\u043c, \u0441\u043e\u044e\u0437\u0430\u043c \u0438 \u043f\u0440\u043e\u0447\u0438\u043c \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f\u043c \u0431\u0443\u043a\u0432, \u043d\u0435\u0441\u0443\u0449\u0438\u043c \u043c\u0430\u043b\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0438\u0437 \u0444\u043e\u0440\u043c\u0443\u043b\u044b BM25 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u0432 \u0431\u041e\u043b\u044c\u0448\u0435\u0439 \u043c\u0435\u0440\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/454\/bcf\/223\/454bcf2237969471e1a67da0a080eb41.svg\" alt=\"$IDF$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0442\u0435\u0440\u043c\u0430 \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435. \u0427\u0435\u043c \u0440\u0435\u0436\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0440\u043c, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0435\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u043a\u043b\u0430\u0434 \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math>.<\/p>\n<h2><font color=\"#cc0000\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/font><\/h2>\n<p>  \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0438\u0441\u043a\u043e\u0432 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043d\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c top-K \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u043f\u043e BM25 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u043d\u0430\u0431\u043e\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a. \u0412\u0441\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f document ID \u0438\u043b\u0438 <i>DID<\/i>. \u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u0440\u043c\u044b, \u0442\u0435\u0440\u043c\u044b \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D1%82%D0%B5%D0%BC%D0%BC%D0%B8%D0%BD%D0%B3\" rel=\"nofollow noopener noreferrer\">\u043e\u0431\u0440\u0435\u0437\u0430\u044e\u0442\u0441\u044f<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9B%D0%B5%D0%BC%D0%BC%D0%B0%D1%82%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F\" rel=\"nofollow noopener noreferrer\">\u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435<\/a>. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a <i>DID<\/i> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u044d\u0442\u043e\u0442 \u0442\u0435\u0440\u043c \u2014 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n1\/m2\/1u\/n1m21uvb8olfafuu5av8kvoaihu.png\" alt=\"terms-and-posting-lists\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 1: \u041f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b<\/font><\/i><\/p>\n<p>  \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435, \u0433\u0434\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u0440\u043c \u0438\u043b\u0438 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0442\u0435\u0440\u043c\u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u042d\u0442\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u043c\u0435\u0442\u0440\u0438\u043a \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u0436\u043d\u043e \u0432\u0437\u0430\u0438\u043c\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u0440\u043c\u043e\u0432 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435. \u0421\u0430\u043c \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e <i>DID<\/i>, \u0445\u043e\u0442\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0438\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u0435\u0433\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u2014 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0432\u0441\u0435\u0445 \u0442\u0435\u0440\u043c\u043e\u0432. \u041f\u043e\u0434 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <a href=\"https:\/\/en.wikipedia.org\/wiki\/Key%E2%80%93value_database\" rel=\"nofollow noopener noreferrer\">KV-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/a>, \u0433\u0434\u0435 \u0442\u0435\u0440\u043c\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0430\u043c\u0438, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u0432 RAM \u0438\u043b\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f KV-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0442\u0435\u0440\u043c\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/habr.com\/ru\/post\/111874\/\">\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f<\/a>. <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wg\/am\/wz\/wgamwzgfeawopd_ei-jtwvgwhnq.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 2: \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0442\u0435\u0440\u043c\u043e\u0432 (\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e)<\/font><\/i><\/p>\n<p>  \u0412 Tantivy \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0440\u043c\u043e\u0432 \u0432\u043e\u043e\u0431\u0449\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b <a href=\"https:\/\/blog.burntsushi.net\/transducers\/\" rel=\"nofollow noopener noreferrer\">finite-state transducers<\/a> \u0447\u0435\u0440\u0435\u0437 crate <a href=\"https:\/\/docs.rs\/fst\/0.4.5\/fst\/\" rel=\"nofollow noopener noreferrer\">fst<\/a>. \u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u043f\u0440\u043e\u0449\u0430\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u044e\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u0432 \u0443 \u043a\u043b\u044e\u0447\u0435\u0439, \u0430 \u0442\u0440\u0430\u043d\u0441\u0434\u044e\u0441\u0435\u0440\u044b \u0435\u0449\u0451 \u043c\u043e\u0433\u0443\u0442 \u0438 \u043e\u0431\u0449\u0438\u0435 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u044b \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0436\u0430\u0442\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043d\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u0430 \u0430\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0440\u0433\u0440\u0430\u0444.<\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 fst \u0432 \u043a\u0440\u0430\u0439\u043d\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u0436\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0438 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041a\u0440\u0430\u0439\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0441\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u0430\u0448\u0438\u0445 \u0442\u0435\u0440\u043c\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u043e\u0431\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0435 \u0432 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 URL\u044b. <\/p>\n<p>  \u0415\u0449\u0451 \u0432 fst \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f, \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c \u2014 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438 \u0433\u0440\u0430\u0444\u044b \u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043d\u0430 \u0434\u0438\u0441\u043a \u0442\u043e \u0435\u0449\u0451 \u0440\u0430\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435. \u0418 \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0445\u0435\u0448-\u0442\u0430\u0431\u043b\u0438\u0446, fst \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 (wildcard) \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0430\u043c. \u0413\u043e\u0432\u043e\u0440\u044f\u0442, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u043e\u0439 \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445, \u043d\u043e \u044f \u0442\u0430\u043a\u0438\u0445 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0442\u0435\u0440\u043c\u043e\u0432 \u0438 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b0\/012\/4e4\/9b00124e411362185d05b841bc32695f.svg\" alt=\"$t$\" data-tex=\"inline\"><\/math> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044d\u0442\u043e\u0442 \u0442\u0435\u0440\u043c \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u0417\u0430\u0442\u0435\u043c \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430 \u0438 \u0432\u0437\u044f\u0442\u044c top-K \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. <\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math> \u0438\u0437 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0438\u0440. \u0412 Tantivy \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f BM25, \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438:  <\/p>\n<p><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c73\/1f6\/0b5\/c731f60b5fd5cf962abbe106b3d422c9.svg\" alt=\"$score(t, d)=\\sum_{t \\in q} \\frac{tf(t, d) (k + 1)}{tf(t, d) + k(1 - b + b\\frac{dl(d)}{dl_{avg}})} * \\log\\frac{N - df(t) + 0.5}{df(t) + 0.5}$\" data-tex=\"display\"><\/math><\/p>\n<ul>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/299\/36b\/08d29936b136916db6188ce107fdbd34.svg\" alt=\"$tf(t, d)$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e <i>DID<\/i> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0435 \u0442\u0435\u0440\u043c\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b0\/012\/4e4\/9b00124e411362185d05b841bc32695f.svg\" alt=\"$t$\" data-tex=\"inline\"><\/math>, \u043b\u0438\u0431\u043e \u0445\u0440\u0430\u043d\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c, \u0447\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. Tantivy \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442: \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u0442 <i>DID<\/i> \u0432 \u0431\u043b\u043e\u043a\u0438 \u043f\u043e 128 \u0447\u0438\u0441\u0435\u043b, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0438\u0448\u0435\u0442 \u0431\u043b\u043e\u043a \u0438\u0437 128 \u0447\u0430\u0441\u0442\u043e\u0442 \u0442\u0435\u0440\u043c\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <a href=\"https:\/\/fulmicoton.com\/posts\/behold-tantivy\/\" rel=\"nofollow noopener noreferrer\">bitpack-\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0443<\/a><\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1ec\/797\/4ff\/1ec7974ff27c89f16eba2f021f21bd89.svg\" alt=\"$df(t)$\" data-tex=\"inline\"><\/math> \u2014 \u0434\u043b\u0438\u043d\u0430 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/56a\/7e8\/421\/56a7e842118f6170aaa745db8ca0db11.svg\" alt=\"$dl_{avg}$\" data-tex=\"inline\"><\/math> \u2014 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0432\u0443\u0445 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a, \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0438 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u0432\u0441\u0435\u0445 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432. \u041e\u0431\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/li>\n<li><math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/249\/753\/480\/24975348062c421f3110913d74106781.svg\" alt=\"$dl(d)$\" data-tex=\"inline\"><\/math> \u2014 \u0445\u0440\u0430\u043d\u0438\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435<\/li>\n<\/ul>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0442\u0435\u0440\u043c\u043e\u0432, \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u0438 \u0434\u043b\u0438\u043d \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 Tantivy (\u0438 Lucene) \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u0444\u0430\u0439\u043b\u0430\u0445:<\/p>\n<ul>\n<li>\u0422\u043e\u0447\u043d\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0441\u043b\u043e\u0432 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445<\/li>\n<li>\u0421\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u044b \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0430\u043c (\u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u043b\u044c\u0448\u0435)<\/li>\n<li>\u041f\u0440\u044f\u043c\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0441\u0430\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e \u0435\u0433\u043e <i>DID<\/i>. \u0420\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u0440\u044f\u043c\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u0436\u0430\u0442\u044b\u043c\u0438 \u0442\u044f\u0436\u0435\u043b\u044b\u043c\u0438 \u043a\u043e\u0434\u0435\u043a\u0430\u043c\u0438 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/github.com\/google\/brotli\" rel=\"nofollow noopener noreferrer\">brotli<\/a><\/li>\n<li>FastFields \u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0432 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 KV-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0430-\u043b\u044f PageRank \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0438 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 \u0432\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math><\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430, \u043d\u0430\u0439\u0434\u0435\u043c top-K \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u0435\u0440\u0432\u0430\u044f \u0438\u0434\u0435\u044f \u2014 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0445 \u043e\u0446\u0435\u043d\u043a\u0438, \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0438 \u0432\u0437\u044f\u0442\u044c \u041a \u043f\u0435\u0440\u0432\u044b\u0445. \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0451 \u0432 RAM \u0438 \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0443 \u043d\u0430\u0441 \u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c. <\/p>\n<p>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u043e\u0431\u0445\u043e\u0434\u0435 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043f\u0435\u0440\u0432\u044b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8b1\/9d8\/49a\/8b19d849a66473b36d68c78d06462129.svg\" alt=\"$K$\" data-tex=\"inline\"><\/math> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043b\u0430\u0434\u0443\u0442\u0441\u044f \u0432 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Heap_(data_structure)\" rel=\"nofollow noopener noreferrer\">\u043a\u0443\u0447\u0443<\/a> (\u0434\u0430\u043b\u0435\u0435 top-K heap) \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e. \u0410 \u0437\u0430\u0442\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u043a\u043b\u0430\u0434\u0435\u0442\u0441\u044f \u0432 \u043a\u0443\u0447\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0435\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0432\u044b\u0448\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0438\u0437 \u043a\u0443\u0447\u0438. \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432 top-K heap \u0434\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d \u043a\u0430\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff2\/c64\/99d\/ff2c6499d038a61a41d7ce75cd78788f.svg\" alt=\"$\\theta$\" data-tex=\"inline\"><\/math>.<\/p>\n<h3><font color=\"#cc0000\">\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0434 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u0440\u043c\u043e\u0432<\/font><\/h3>\n<p>  \u0427\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u00ab\u0441\u043a\u0430\u0447\u0430\u0442\u044c OR \u043a\u043e\u0442\u0438\u043a\u0438\u00bb? \u041e\u043d \u0437\u0430\u0432\u0435\u0434\u0435\u0442 \u0434\u0432\u0430 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u043e \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430\u043c \u0434\u043b\u044f \u0442\u0435\u0440\u043c\u043e\u0432 \u00ab\u0441\u043a\u0430\u0447\u0430\u0442\u044c\u00bb \u0438 \u00ab\u043a\u043e\u0442\u0438\u043a\u0438\u00bb, \u043d\u0430\u0447\u043d\u0435\u0442 \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043e\u0431\u043e\u0438\u043c \u043b\u0438\u0441\u0442\u0430\u043c, \u043f\u043e\u043f\u0443\u0442\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044f top-K heap.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f AND-\u0437\u0430\u043f\u0440\u043e\u0441, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0443\u0442 \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u0431\u0435\u0437 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f \u043d\u0438\u0445.<\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u043e\u0432 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f OR-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0410 \u0432\u0441\u0451 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 TF-IDF \u0438\u043b\u0438 BM25 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0442\u043e\u043f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0441 \u0431\u041e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0441\u043e\u0432\u043f\u0430\u0432\u0448\u0438\u0445 \u0441\u043b\u043e\u0432. \u042d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 top-K \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b AND-\u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  \u041d\u0430\u0438\u0432\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 OR-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/li>\n<li>\u0417\u0430\u0432\u043e\u0434\u0438\u043c top-K heap<\/li>\n<li>\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u043e <i>DID<\/i>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442<\/li>\n<li>\u0411\u0435\u0440\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u0438 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0442\u043e\u0442 \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u0422\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c <i>DID<\/i> \u0438 \u0442\u0435\u0440\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435<\/li>\n<li>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0442\u0435\u0440\u043c\u0430\u043c, \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0438\u0445, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u0415\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439, \u0442\u043e \u043a\u043b\u0430\u0434\u0435\u043c \u0435\u0433\u043e \u0432 top-K heap<\/li>\n<li>\u041f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043f.3<\/li>\n<\/ol>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lz\/ot\/xs\/lzotxs7bj4dunbns3tpgd4zxtli.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 3: \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u0438 OR-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0427\u0443\u0442\u044c \u043d\u0438\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/font><\/i><\/p>\n<p>  \u0412 \u043f.4 \u0441\u0431\u043e\u0440 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e <i>DID<\/i>. \u041f\u0435\u0440\u0435\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u043f.3 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043a\u0430\u043a\u0438\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b \u0432 \u043f.6.<\/p>\n<h2><font color=\"#cc0000\">\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/font><\/h2>\n<p>  \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u0449\u0443\u0442\u0441\u044f \u043d\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e K \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0436\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u2014 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0439 \u0438 \u043c\u044b \u0438\u0437\u0431\u0435\u0436\u0438\u043c \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430\u0434 \u043d\u0435\u0439. \u0422\u0430\u043a\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0435\u0449\u0451 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u043a\u0430\u043a Top-K queries.<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043d\u0430 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 OR-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 <a href=\"https:\/\/doi.org\/10.1145\/3041021.3054191\" rel=\"nofollow noopener noreferrer\">Bortnikov, 2017<\/a>:  <\/p>\n<pre><code class=\"plaintext\">Input:   termsArray - Array of query terms   k - Number of results to retrieve Init:   for t \u2208 termsArray do t.init()   heap.init(k)   \u03b8 \u2190 0   Sort(termsArray)  Loop:    while (termsArray[0].doc() &lt; \u221e) do     d \u2190 termsArray[0].doc()     i \u2190 1     while (i &lt; numTerms \u2229 termArray[i].doc() = d) do       i \u2190 i + 1     score \u2190 Score(d, termsArray[0..i \u2212 1]))     if (score \u2265 \u03b8) then        \u03b8 \u2190 heap.insert(d, score)     advanceTerms(termsArray[0..i \u2212 1])      Sort(termsArray) Output: return heap.toSortedArray()  function advanceTerms(termsArray[0..pTerm])    for (t \u2208 termsArray[0..pTerm]) do     if (t.doc() \u2264 termsArray[pTerm].doc()) then        t.next() <\/code><\/pre>\n<p>  \u041d\u0430\u0438\u0432\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0430\u0441\u0438\u043c\u043f\u0442\u043e\u0442\u0438\u043a\u043e\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b9a\/1f3\/c96\/b9a1f3c96d93feb1e4f710b4c0da328b.svg\" alt=\"$O(LQ\\log{Q})$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 L \u2014 \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432, \u0430 Q \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0432 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u0430\u0433\u043b\u0435\u0432, \u0438\u0437 \u043e\u0446\u0435\u043d\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e4d\/e08\/594\/e4de08594fcff8edbbe33083d2079439.svg\" alt=\"$Q\\log{Q}$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0435 \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430 \u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e4d\/e08\/594\/e4de08594fcff8edbbe33083d2079439.svg\" alt=\"$Q\\log{Q}$\" data-tex=\"inline\"><\/math> \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439.<\/p>\n<p>  \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0432\u043a\u043b\u0430\u0434 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432\u043d\u043e\u0441\u0438\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0440\u043f\u0443\u0441\u0430 (\u0442.\u0435 \u0434\u043b\u0438\u043d\u044b \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432) \u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0435 \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043a\u0440\u0430\u0442\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0414\u0430\u0436\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7c4\/ad3\/b1c\/7c4ad3b1c6cbe223f4c78b25bbd966f7.svg\" alt=\"$O(L)$\" data-tex=\"inline\"><\/math> \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0433\u0440\u0443\u0441\u0442\u043d\u043e\u0439 \u043e\u0446\u0435\u043d\u043a\u043e\u0439.<\/p>\n<h3><font color=\"#cc0000\">\u0421\u0436\u0430\u0442\u0438\u0435 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432<\/font><\/h3>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432. \u0425\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u0438 \u0431\u0435\u0433\u0430\u0442\u044c \u0432\u0434\u043e\u043b\u044c \u043d\u0438\u0445 \u0431\u0435\u0437 \u0432\u044b\u0434\u043e\u0445\u0430 \u2014 \u043f\u043b\u043e\u0445\u0430\u044f \u0438\u0434\u0435\u044f. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u0442\u044c \u0432 \u0434\u0438\u0441\u043a. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0434\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0441 \u0434\u0438\u0441\u043a\u0430, \u0442\u0435\u043c \u0432\u0441\u0451 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u0441\u0436\u0430\u0442\u0438\u0435.<\/p>\n<p>  \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442 \u2014 \u044d\u0442\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a <i>DID<\/i>, \u0441\u0430\u043c\u0438 <i>DID<\/i> \u2014 \u043e\u0431\u044b\u0447\u043d\u043e 64-\u0431\u0438\u0442\u043d\u044b\u0435 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u0427\u0438\u0441\u043b\u0430 \u0432 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0435 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u0438 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0442 0 \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c\u043e\u0433\u043e \u0441 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u0440\u043f\u0443\u0441\u0435.<\/p>\n<p>  <b><font color=\"#cc0000\">VarLen Encoding<\/font><\/b><\/p>\n<p>  \u0421\u0442\u0440\u0430\u043d\u043d\u043e \u0442\u0440\u0430\u0442\u0438\u0442\u044c 8 \u0431\u0430\u0439\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u044e\u0434\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u043a\u043e\u0434\u044b, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0430\u043b\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0431\u0430\u0439\u0442. \u0422\u0430\u043a\u0438\u0435 \u0441\u0445\u0435\u043c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430\u043c\u0438 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u043e\u0439. \u041d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/developers.google.com\/protocol-buffers\/docs\/encoding#:~:text=Varints%20are%20a%20method%20of,are%20further%20bytes%20to%20come.\" rel=\"nofollow noopener noreferrer\">varint<\/a>. <\/p>\n<p>  \u0427\u0442\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432 varint \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u0430\u0439\u0442 \u0437\u0430 \u0431\u0430\u0439\u0442\u043e\u043c. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u0439\u0442 \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0431\u0438\u0442 \u0438 7 \u0431\u0438\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0421\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0431\u0438\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u043d\u0430\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0431\u0430\u0439\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c. \u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0431\u0430\u0439\u0442\u0430 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0436\u0438\u043c\u0430\u044e\u0442\u0441\u044f varint&#8217;\u043e\u043c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0440\u0443\u043a\u0438 \u2014 \u043f\u0440\u044b\u0433\u043d\u0443\u0442\u044c \u0432\u043f\u0435\u0440\u0435\u0434 \u0432 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 N \u0447\u0438\u0441\u0435\u043b \u043d\u0435\u043b\u044c\u0437\u044f, \u0432\u0435\u0434\u044c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0433\u0434\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0438 \u043e \u043a\u0430\u043a\u043e\u0439 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0447\u0438 \u043d\u0435 \u0438\u0434\u0435\u0442.<\/p>\n<p>  <b><font color=\"#cc0000\">SIMD<\/font><\/b><\/p>\n<p>  \u0414\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0435\u043b\u0438 <a href=\"https:\/\/github.com\/as-com\/varint-simd\" rel=\"nofollow noopener noreferrer\">\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u043d\u044b\u0435 \u0441\u0445\u0435\u043c\u044b<\/a>, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 varint, \u043d\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u0445\u0435\u043c\u0430\u0445 \u0447\u0438\u0441\u043b\u0430 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u043e N \u0447\u0438\u0441\u0435\u043b \u0438 \u043a\u0430\u0436\u0434\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0431\u0438\u0442, \u0430 \u0432\u0441\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u043c, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0447\u0442\u043e \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c. \u041e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0437\u0430\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SIMD-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 (SSE3 \u0432 Intel) \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0433\u0440\u0443\u043f\u043f, \u0447\u0442\u043e \u043a\u0440\u0430\u0442\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b. <\/p>\n<p>  <b><font color=\"#cc0000\">Delta-encoding<\/font><\/b><\/p>\n<p>  Varint \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u0436\u0438\u043c\u0430\u0435\u0442 \u043c\u0430\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0445\u0443\u0436\u0435 \u0441\u0436\u0438\u043c\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0447\u0438\u0441\u043b\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0436\u0430\u0442\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0445\u0443\u0436\u0435. \u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0432 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435 \u0441\u0430\u043c\u0438 <i>DID<\/i>, \u0430 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 <i>DID<\/i>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043c\u0435\u0441\u0442\u043e [2, 4, 6, 9, 13] \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c [2, 2, 2, 3, 4].<\/p>\n<p>  \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0451 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0421\u0436\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f i-\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0432\u0441\u0435\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043e i-\u0433\u043e. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a\u0430\u044f \u0443\u0436 \u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0432\u0435\u0434\u044c varint \u0438 \u0442\u0430\u043a \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0447\u0442\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c.<\/p>\n<h3><font color=\"#cc0000\">\u0421\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u044b \u0434\u043b\u044f \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430\u043c<\/font><\/h3>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u0436\u0430\u0442\u0438\u044f \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432, \u043c\u0430\u0441\u0441\u0438\u0432 \u0447\u0438\u0441\u0435\u043b \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a. \u0412\u0441\u0451, \u0447\u0442\u043e \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u044d\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u043a \u043a\u043e\u043d\u0446\u0443. \u0425\u043e\u0442\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0435\u043a\u0446\u0438\u044f\u0445 \u0441\u0445\u0435\u043c\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e <i>DID<\/i> \u0432\u043f\u0435\u0440\u0435\u0434.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u2014 <a href=\"https:\/\/habr.com\/ru\/post\/139870\/\">\u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u044b<\/a>. \u0421\u043a\u0438\u043f-\u043b\u0438\u0441\u0442 \u0436\u0438\u0432\u0435\u0442 \u0440\u044f\u0434\u043e\u043c \u0441\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0447\u0438\u0441\u0435\u043b \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0447\u0438\u0441\u0435\u043b \u043d\u0430\u0439\u0442\u0438 \u0425, \u0442\u043e \u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442 \u0437\u0430 \u0432\u0440\u0435\u043c\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/04b\/03b\/159\/04b03b1591f97bdc376d298cb6ddf327.svg\" alt=\"$O(log(L))$\" data-tex=\"inline\"><\/math> \u043f\u043e\u044f\u0441\u043d\u0438\u0442 \u0432\u0430\u043c, \u043a\u0443\u0434\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0434\u043e \u043f\u0440\u044b\u0433\u043d\u0443\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0435\u0440\u0435\u0434 \u0425. \u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u044b\u0436\u043a\u0430 \u0432\u044b \u0443\u0436\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0438\u0434\u0435\u0442\u0435 \u0434\u043e \u0425.<\/p>\n<p>  \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u044b\u0436\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0434 \u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442 \u2014 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441 \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445. \u0412 Tantivy \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432\u0434\u043e\u043b\u044c \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u0430\u043c\u0438. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u0430 <a href=\"https:\/\/github.com\/crossbeam-rs\/crossbeam-skiplist\" rel=\"nofollow noopener noreferrer\">lock-free \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/a> \u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u0430, \u043d\u043e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 (\u043c\u0430\u0440\u0442 2021) \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u043e\u0439.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0435\u0449\u0451 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b \u0434\u043e \u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u043a\u0443\u0434\u0430 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u044b\u0433\u043d\u0443\u0442\u044c, \u0438\u043d\u0430\u0447\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 Delta-encoding.<\/p>\n<h3><font color=\"#cc0000\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 OR-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/font><\/h3>\n<p>  \u0412\u0441\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u0445\u043e\u0434\u0430 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0438 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 top-K \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043d\u0430\u0438\u0432\u043d\u044b\u043c OR-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c. \u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u043d\u043e \u043e\u043d\u0438 \u043c\u0435\u043d\u044f\u044e\u0442 top-K \u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<p>  <b><font color=\"#cc0000\">MaxScore<\/font><\/b><\/p>\n<p>  MaxScore \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0435\u0440\u0432\u044b\u0445 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 OR-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c, \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 <a href=\"https:\/\/doi.org\/10.1016\/0306-4573%2895%2900020-h\" rel=\"nofollow noopener noreferrer\">Turtle, 1995<\/a>.<\/p>\n<p>  \u0421\u0443\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0438 \u0442\u0435\u0440\u043c\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0434\u0432\u0430 \u043d\u0435\u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430: \u00ab\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445\u00bb \u0438 \u00ab\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445\u00bb. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0442\u0435\u0440\u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u00ab\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430, \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0439\u0442\u0438 \u0432 top-K \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u043c\u043e\u0442\u0430\u043d\u044b \u0432\u043f\u0435\u0440\u0435\u0434 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u00ab\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439\u00bb \u0442\u0435\u0440\u043c. <\/p>\n<p>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u0442\u0435\u0440\u043c\u0430, \u0432\u0432\u0435\u0434\u0435\u043d\u044b\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e TF-IDF \u0438 BM25? \u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u043a\u043b\u0430\u0434 \u0442\u0435\u0440\u043c\u0430 \u0432 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/454\/bcf\/223\/454bcf2237969471e1a67da0a080eb41.svg\" alt=\"$IDF$\" data-tex=\"inline\"><\/math> \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043b\u0435\u0442\u0443.<\/p>\n<p>  \u0418\u043c\u0435\u044f \u043d\u0430 \u0440\u0443\u043a\u0430\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math>, \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u0440\u043c\u044b \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e \u0438\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u043e\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0442\u0435\u0440\u043c\u0430. \u0412\u0441\u0435 \u0442\u0435\u0440\u043c\u044b \u0441 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439 \u043c\u0435\u043d\u044c\u0448\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff2\/c64\/99d\/ff2c6499d038a61a41d7ce75cd78788f.svg\" alt=\"$\\theta$\" data-tex=\"inline\"><\/math> \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u043a \u00ab\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443\u00bb \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0442\u0435\u0440\u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u00ab\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0446\u0435\u043d\u0435\u043d \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0441\u0443\u043c\u043c\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u044d\u0442\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0421\u0442\u0430\u043b\u043e \u0431\u044b\u0442\u044c, \u0442\u0430\u043a\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u0432\u043e\u0439\u0434\u0435\u0442 \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e. <\/p>\n<p>  \u0418\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0442\u0435\u0440\u043c \u0438\u0437 \u00ab\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e\u00bb \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0442\u0435\u0440\u043c\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u043c\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b \u00ab\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445\u00bb \u0442\u0435\u0440\u043c\u043e\u0432 \u0434\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0438\u0437 <i>DID<\/i>&#8216;\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u00ab\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445\u00bb \u0442\u0435\u0440\u043c\u043e\u0432. \u0422\u0443\u0442-\u0442\u043e \u043d\u0430\u043c \u0438 \u043d\u0443\u0436\u043d\u044b \u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u044b, \u0431\u0435\u0437 \u043d\u0438\u0445 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0438\u0433\u0440\u044b\u0448\u0430 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0431\u044b.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/n7\/q0\/ow\/n7q0ow79sxorkopt9ieuzj3lbze.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 4: \u041f\u0440\u043e\u043c\u043e\u0442\u043a\u0430 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 MaxScore<\/font><\/i><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f top-K heap \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0442\u0435\u0440\u043c\u044b \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u00ab\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u00bb \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435. <\/p>\n<p>  <b><font color=\"#cc0000\">Weak AND (WAND)<\/font><\/b><\/p>\n<p>  WAND \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 <a href=\"https:\/\/doi.org\/10.1145\/956863.956944\" rel=\"nofollow noopener noreferrer\">Broder, 2003<\/a>. \u0412 \u0447\u0435\u043c-\u0442\u043e \u043e\u043d \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 MaxScore: \u0442\u0430\u043a\u0436\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff2\/c64\/99d\/ff2c6499d038a61a41d7ce75cd78788f.svg\" alt=\"$\\theta$\" data-tex=\"inline\"><\/math>.<\/p>\n<ol>\n<li>\u0412\u0441\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0442\u0435\u0440\u043c\u043e\u0432 WAND \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 <i>DID<\/i>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440<\/li>\n<li>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math><\/li>\n<li>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f <i>pivotTerm<\/i> \u2014 \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0440\u043c, \u0447\u044c\u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff2\/c64\/99d\/ff2c6499d038a61a41d7ce75cd78788f.svg\" alt=\"$\\theta$\" data-tex=\"inline\"><\/math><\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 <i>pivotTerm<\/i>&#8216;\u0443 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b.\n<p>  \u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0442\u043e \u044d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u0445\u043e\u0434\u0438\u0442\u044c \u0432 top-K \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0441\u0441\u0447\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math>. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u0438\u043d \u0438\u0437 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 <i>DID<\/i>, \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u0447\u0435\u043c <i>pivotTerm.DID<\/i>, \u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u0432\u043f\u0435\u0440\u0435\u0434 \u0434\u043e <i>DID<i>, \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u0447\u0435\u043c<\/i>pivotTerm.DID<\/i>.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/li>\n<\/ol>\n<p>  <b><font color=\"#cc0000\">Block-max WAND (BMW)<\/font><\/b><\/p>\n<p>  BMW \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 WAND \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0432 <a href=\"https:\/\/doi.org\/10.1145\/2009916.2010048\" rel=\"nofollow noopener noreferrer\">Ding, 2011<\/a>. \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0430, \u043c\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b \u043d\u0430 \u0431\u043b\u043e\u043a\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/458\/5ab\/b85\/4585abb85620ab51964e705349e13215.svg\" alt=\"$UB$\" data-tex=\"inline\"><\/math> \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 WAND, \u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0435\u0449\u0435 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/458\/5ab\/b85\/4585abb85620ab51964e705349e13215.svg\" alt=\"$UB$\" data-tex=\"inline\"><\/math> \u0431\u043b\u043e\u043a\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u044d\u0442\u0430 \u0441\u0443\u043c\u043c\u0430 \u043d\u0438\u0436\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ff2\/c64\/99d\/ff2c6499d038a61a41d7ce75cd78788f.svg\" alt=\"$\\theta$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u0431\u043b\u043e\u043a\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>  \u0411\u043b\u043e\u0447\u043d\u044b\u0435 \u043e\u0446\u0435\u043d\u043a\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/458\/5ab\/b85\/4585abb85620ab51964e705349e13215.svg\" alt=\"$UB$\" data-tex=\"inline\"><\/math> \u0442\u0435\u0440\u043c\u043e\u0432 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043d\u0438\u0436\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/668\/8d6\/c23\/6688d6c23198ca2ebfa8c430f8fabf48.svg\" alt=\"$UB_t$\" data-tex=\"inline\"><\/math>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u043a\u0438\u043f\u043d\u0443\u0442\u044b \u0438 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u044b\u0432\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u043e\u043c \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043d\u044b\u0440\u043d\u0443\u0442\u044c \u0432 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0432 \u0443\u0437\u043a\u0438\u0445 \u043a\u0440\u0443\u0433\u0430\u0445 \u0442\u0438\u043a\u0435\u0442 <a href=\"https:\/\/issues.apache.org\/jira\/browse\/LUCENE-4100\" rel=\"nofollow noopener noreferrer\">LUCENE-4100<\/a>. <\/p>\n<p>  TLDR: \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0430\u0436\u043d\u043e\u0439 Block-max WAND-\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u043b\u0447\u0430\u043b\u0438\u0432\u043e \u0434\u043e\u0436\u0438\u0434\u0430\u043b\u0430\u0441\u044c \u0441\u043c\u0435\u043d\u044b TF-IDF \u043d\u0430 BM25, \u0437\u0430\u043d\u044f\u043b\u0430 7 \u043b\u0435\u0442 \u0438 \u0431\u044b\u043b\u0430 \u0432\u044b\u043a\u0430\u0447\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Lucene 7.<\/p>\n<p>  <b><font color=\"#cc0000\">Block Upper Scoring<\/font><\/b><\/p>\n<p>  \u0420\u044f\u0434\u043e\u043c \u0441 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/458\/5ab\/b85\/4585abb85620ab51964e705349e13215.svg\" alt=\"$UB$\" data-tex=\"inline\"><\/math> \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a. \u041b\u0438\u0431\u043e \u0441\u0430\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/458\/5ab\/b85\/4585abb85620ab51964e705349e13215.svg\" alt=\"$UB$\" data-tex=\"inline\"><\/math> \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u043b\u043e \u0432\u0430\u0448\u0443 \u0437\u0430\u0434\u0443\u043c\u043a\u0443.<\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0431\u044b\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u0435\u0436\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b-\u043d\u043e\u0432\u043e\u0441\u0442\u0438. BM25 \u0431\u044b\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u0430 \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/72d\/0cd\/652\/72d0cd6523b6a287fb73e5b37f41653f.svg\" alt=\"$BM25D(q, d, time) = BM25(q, d) * tp(time)$\" data-tex=\"inline\"><\/math> \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/cb3\/d5a\/001\/cb3d5a001a2097623353a83eee330871.svg\" alt=\"$tp$\" data-tex=\"inline\"><\/math> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u0435\u043d\u0430\u043b\u044c\u0442\u0438 \u043d\u0430 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u044e\u0449\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442 0 \u0434\u043e 1. \u041f\u043e\u043c\u0435\u043d\u044f\u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/458\/5ab\/b85\/4585abb85620ab51964e705349e13215.svg\" alt=\"$UB$\" data-tex=\"inline\"><\/math>, \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430 95% \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441 \u043d\u0435\u0441\u0432\u0435\u0436\u0438\u043c\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u043c\u0438, \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u044d\u0442\u043e\u0442 \u0432\u0438\u0434 \u043f\u043e\u0438\u0441\u043a\u0430. \u0421\u0430\u043c \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0431\u043b\u043e\u0447\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u043c \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u0440\u0435\u0434\u0435\u043b\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u043a \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043c.<\/p>\n<h2><font color=\"#cc0000\">\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/font><\/h2>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u0438 \u043f\u0440\u0438\u0437\u0435\u043c\u043b\u0435\u043d\u0438\u0435\u043c \u0432 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0430\u043f\u043e\u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.\u00a0<\/p>\n<h3><font color=\"#cc0000\">\u0420\u0430\u0437\u0431\u043e\u0440 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/font><\/h3>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/r8\/9r\/ud\/r89rudf38p_8rvmbg6u0dsva8do.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 5: \u042d\u0442\u0430\u043f\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/font><\/i><\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0418\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f, \u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443, \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0435\u043c\u043c\u0438\u043d\u0433, \u043b\u0435\u043c\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432. \u0418\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.<\/p>\n<p>  \u0411\u0443\u0434\u0443\u0442 \u043b\u0438 \u0442\u043e\u043a\u0435\u043d\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c OR \u0438\u043b\u0438 AND \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u2014 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 AND \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0435\u0441\u0442\u044c \u0440\u0438\u0441\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0442\u0438. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u044b\u0434\u0430\u0447\u0438 \u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<p>  \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u0443 \u043f\u043b\u0430\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0412 Tantivy \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f Scorer. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Scorer \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0442\u0440\u043e\u043c \u0432\u0441\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u0430 \u0437\u0430 \u0438\u0442\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u0438 \u0437\u0430 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<h3><font color=\"#cc0000\">\u042d\u0442\u0430\u043f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/font><\/h3>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u043e\u043d \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442, \u0430 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0435. \u0418 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0438\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0446\u0435\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u2014 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0442\u0435\u0440\u043c\u0430\u043c\u0438 \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438. <\/p>\n<p>  \u0417\u0430\u043f\u0440\u043e\u0441 \u0440\u0430\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u0430\u043c\u0438, \u0442\u0435\u0440\u043c\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u044b, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0434\u0440\u0443\u0433\u0438\u0445 \u0445\u0430\u043a\u043e\u0432, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u0430\u043c\u0438. \u042d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f query extension, \u043e\u043d \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0432\u0430\u0436\u0435\u043d \u0434\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u0435\u0448\u0435\u0432\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0434\u0430\u0441\u0442 \u043b\u0438 \u0432\u0430\u043c \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0444\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435. \u041c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u044f \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u2014 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c \u043a \u043a\u0430\u043d\u043e\u043d\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 (\u043b\u0435\u043c\u043c\u0435). <\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">\u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u0441\u043a\u0430\u0447\u0430\u0442\u044c, \u0441\u043a\u0430\u0447\u0430\u043b, \u0441\u043a\u0430\u0447\u0430\u043b\u0438 -&gt; \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043a\u043e\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u0438\u043a\u0430\u043c -&gt; \u043a\u043e\u0442\u0438\u043a<\/code><\/pre>\n<p>  \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\u0422\u044f\u0436\u0435\u043b\u044b\u0439: \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u043b\u0435\u043c\u043c\u044b, \u0438 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435. \u041d\u0443\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u043a\u043e\u0440\u043f\u0443\u0441\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.\u00a0<\/li>\n<li>\u041a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u043d\u044b\u0439: \u043f\u0435\u0440\u0435\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0440\u043f\u0443\u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0438\u0432\u043e\u0434\u044f \u0432\u0441\u0435 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u044b \u043a \u043b\u0435\u043c\u043c\u0430\u043c \u043d\u0430 \u043b\u0435\u0442\u0443, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u0435\u043c\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041c\u0435\u043d\u044c\u0448\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0432\u0441\u0435 \u0442\u0430\u043a \u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f.<\/li>\n<li>\u041f\u0440\u043e\u0441\u0442\u043e\u0439: \u0440\u0430\u0437\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0441\u0435\u043c\u0438 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c\u0430\u043c\u0438. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u00ab\u0441\u043a\u0430\u0447\u043a\u0430 \u043a\u043e\u0442\u0438\u043a\u043e\u0432\u00bb \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d \u0432\u043e \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 &quot;(\u0441\u043a\u0430\u0447\u043a\u0430^2 OR \u0441\u043a\u0430\u0447\u0430\u0442\u044c OR \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c OR \u0441\u043a\u0430\u0447\u0430\u043b) AND (\u043a\u043e\u0442\u0438\u043a\u043e\u0432^2 OR \u043a\u043e\u0442\u0438\u043a\u0438 OR \u043a\u043e\u0442\u0438\u043a OR \u043a\u043e\u0442\u0438\u043a\u0430\u043c)&quot;. \u0412\u044b\u0434\u0430\u0447\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0431\u044b \u043c\u044b \u0443\u043c\u0435\u0435\u043c \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043b\u0435\u043c\u043c\u0430\u043c\u0438. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f!<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435 \u0433\u0438\u043f\u043e\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u044b \u043d\u0430 \u044d\u0442\u0430\u043f query extension \u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u042d\u0442\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0430\u043c \u043a\u0443\u0447\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. Fail often, fail fast!<\/p>\n<h2><font color=\"#cc0000\">\u0417\u0430\u043f\u0438\u0441\u044c \u0438 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/font><\/h2>\n<p>  \u0412 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 Lucene \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0430\u0440\u0435\u0437\u0430\u043d \u043d\u0430 <i>\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b<\/i>. \u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0432\u043e\u044e \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 <i>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c<\/i>. \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432 RAM \u043d\u043e\u0432\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0434\u0435\u043b\u0430\u0435\u043c <i>commit<\/i> \u0438 \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 RAM \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442.<\/p>\n<p>  \u0421\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 (\u0441\u043a\u0438\u043f-\u043b\u0438\u0441\u0442\u044b \u0438\u043b\u0438 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u044b) \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438. \u041a \u043d\u0438\u043c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0421\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0434\u0435\u0441\u044c \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0438\u044f\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c N-Way Merge \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u2014 \u043f\u043b\u043e\u0445\u043e. \u0410 \u0442\u0430\u043a\u043e\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 Tantivy \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u0441\u043b\u0438\u044f\u043d\u0438\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f \u043c\u043d\u043e\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0438\u043a\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442. <\/p>\n<p>  \u041f\u0440\u0438 \u0441\u043b\u0438\u044f\u043d\u0438\u0438 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0436\u0430\u0442\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043b\u0438\u0442\u044b, \u0430 \u0447\u0430\u0441\u0442\u044c \u2014 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 \u0432\u0430\u0448\u0438 CPU. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043b\u0438\u044f\u043d\u0438\u0439 \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043e\u0431\u0449\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0438\u0448\u0443\u0449\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0435.<\/p>\n<h2><font color=\"#cc0000\">\u0428\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441: \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0438\u043b\u0438 \u043f\u043e \u0442\u0435\u0440\u043c\u0430\u043c. <\/p>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 N \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c \u043c\u0438\u043d\u0438-\u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u2014 \u0445\u0440\u0430\u043d\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u0440\u043c\u043e\u0432 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u0442\u0432\u0435\u0442\u044b \u0448\u0430\u0440\u0434\u043e\u0432 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<th><\/th>\n<th>\u041f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c<\/th>\n<th>\u041f\u043e \u0442\u0435\u0440\u043c\u0430\u043c<\/th>\n<\/tr>\n<tr>\n<th>\u041d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u0441\u0435\u0442\u044c<\/th>\n<td><font color=\"#006600\">\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f<\/font><\/td>\n<td><font color=\"#ee0000\">\u0411\u043e\u043b\u044c\u0448\u0430\u044f<\/font><\/td>\n<\/tr>\n<tr>\n<th>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/th>\n<td><font color=\"#006600\">\u041f\u0440\u043e\u0441\u0442\u043e<\/font><\/td>\n<td><font color=\"#ee0000\">\u0421\u043b\u043e\u0436\u043d\u043e<\/font><\/td>\n<\/tr>\n<tr>\n<th>Disk-seek&#8217;\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0437 K \u0441\u043b\u043e\u0432 \u043d\u0430 N \u0448\u0430\u0440\u0434\u0430\u0445<\/th>\n<td><font color=\"#ee0000\">O(K*N)<\/font><\/td>\n<td><font color=\"#006600\">O(K)<\/font><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>   \u041e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u0441\u0435\u0442\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0447\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0438\u0441\u043a\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Google \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0435\u0440\u0432\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445. \u0412 Tantivy \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u2014 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0448\u0430\u0440\u0434\u0430\u043c\u0438 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0441\u0435\u0434\u0430\u043d\u0438\u0439 \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439, \u043b\u0443\u0447\u0448\u0435 \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u044b \u0442\u0438\u043f\u0430 <a href=\"https:\/\/medium.com\/omarelgabrys-blog\/consistent-hashing-beyond-the-basics-525304a12ba\" rel=\"nofollow noopener noreferrer\">Ring<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/arxiv.org\/pdf\/1406.2294.pdf\" rel=\"nofollow noopener noreferrer\">Jump<\/a> Consistent Hashing \u0434\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u043f\u0435\u0440\u0435\u0448\u0430\u0440\u0434\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0448\u0430\u0440\u0434\u0430.<\/p>\n<h2><font color=\"#cc0000\">\u041c\u043d\u043e\u0433\u043e\u0444\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u0438\u0441\u043a\u0438 \u0438 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u0412 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438: \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u0438\u0441\u043a\u0438 \u0438 \u043c\u0435\u0442\u0430-\u043f\u043e\u0438\u0441\u043a. \u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0438\u0449\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0440\u043f\u0443\u0441\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041c\u0435\u0442\u0430-\u043f\u043e\u0438\u0441\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u0438 \u0445\u0438\u0442\u0440\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043b\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a.\u00a0<\/p>\n<p>  \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u0438\u0441\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e- \u0438 \u0434\u0432\u0443\u0445\u0444\u0430\u0437\u043e\u0432\u044b\u0435. \u0412\u044b\u0448\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0434\u043d\u043e\u0444\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0438\u0441\u043a \u0440\u0430\u043d\u0436\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 \u0442\u0438\u043f\u0430 BM25, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u0443\u0447\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439, \u0438 \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. <\/p>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0444\u0430\u0437\u0430 \u0434\u0432\u0443\u0445\u0444\u0430\u0437\u043e\u0432\u044b\u0445 (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043c\u043d\u043e\u0433\u043e\u0444\u0430\u0437\u043e\u0432\u044b\u0445) \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u0451 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u0410 \u0432\u043e\u0442 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0444\u0430\u0437\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 top-K \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0430\u0437\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0442\u044f\u0436\u0435\u043b\u044b\u0445 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u0440\u0438\u043a. \u0422\u0430\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0442\u0434\u0435\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u043f\u0435\u0440\u0432\u0443\u044e \u0444\u0430\u0437\u0443 \u043d\u0430 \u0432\u0441\u0435\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 \u0442\u044f\u0436\u0435\u043b\u043e\u0439 \u0432\u0442\u043e\u0440\u043e\u0439 \u0444\u0430\u0437\u044b \u043d\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0447\u0430\u0441\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a \u0432\u0442\u043e\u0440\u043e\u0439 \u0444\u0430\u0437\u044b \u0447\u0430\u0441\u0442\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u0440\u043e\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u0444\u0430\u0437\u0443 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0431\u0445\u043e\u0434 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u0438 \u0448\u0430\u0440\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0444\u0430\u0437\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 \u0448\u0430\u0440\u0434\u043e\u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0430\u0437\u044b.<\/p>\n<h3><font color=\"#cc0000\">\u041f\u0435\u0440\u0432\u0430\u044f \u0444\u0430\u0437\u0430 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/font><\/h3>\n<p>  \u041c\u0435\u0442\u0440\u0438\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fd6\/692\/c42\/fd6692c429f3546bed617ffe7791d714.svg\" alt=\"$BM25$\" data-tex=\"inline\"><\/math>, \u0438\u043b\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12d\/5b4\/431\/12d5b443150d6612760f135c99eb9a96.svg\" alt=\"$BM25 * f(IMP)$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6b0\/d1a\/bb7\/6b0d1abb785c3e7ec24d0c74472e691a.svg\" alt=\"$IMP$\" data-tex=\"inline\"><\/math> \u2014 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12a\/b92\/a58\/12ab92a586fb3d91b2b9c1e1ca0dc58c.svg\" alt=\"$f$\" data-tex=\"inline\"><\/math> \u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2b1\/73e\/529\/2b173e5293c3837d17126c9bfe1b2d71.svg\" alt=\"$[0; 1]$\" data-tex=\"inline\"><\/math>. <\/p>\n<p>  \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/12a\/b92\/a58\/12ab92a586fb3d91b2b9c1e1ca0dc58c.svg\" alt=\"$f$\" data-tex=\"inline\"><\/math> \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0438\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0442\u0438\u043f\u0430 BMW, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/473\/33f\/6c0\/47333f6c065ff0f9f5a058c9f9b76c4f.svg\" alt=\"$score(t, d)$\" data-tex=\"inline\"><\/math> \u0432 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u0447\u043d\u044b\u0445 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/458\/5ab\/b85\/4585abb85620ab51964e705349e13215.svg\" alt=\"$UB$\" data-tex=\"inline\"><\/math>. <\/p>\n<p>  BM25 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0441\u0442\u0438\u043d\u0433-\u043b\u0438\u0441\u0442\u0430\u043c\u0438, \u0430 \u0432\u043e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u043b\u0435\u043d\u044b \u0442\u0438\u043f\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6b0\/d1a\/bb7\/6b0d1abb785c3e7ec24d0c74472e691a.svg\" alt=\"$IMP$\" data-tex=\"inline\"><\/math> \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0436\u0430\u0442\u044c \u0440\u044f\u0434\u043e\u043c \u0441 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0430\u0437\u044b \u043f\u043e\u0438\u0441\u043a\u0430. \u0427\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/033\/ab7\/8e4\/033ab78e48a731006f481dd08b9d89a7.svg\" alt=\"$score(q, d)$\" data-tex=\"inline\"><\/math> \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0435\u0433\u0430\u0442\u044c \u043a\u0443\u0434\u0430-\u0442\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0412 \u0432\u0435\u0431-\u043f\u043e\u0438\u0441\u043a\u0435 \u0440\u043e\u043b\u044c \u0447\u043b\u0435\u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6b0\/d1a\/bb7\/6b0d1abb785c3e7ec24d0c74472e691a.svg\" alt=\"$IMP$\" data-tex=\"inline\"><\/math> \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 PageRank, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0440\u0430\u0437 \u0432 N \u0434\u043d\u0435\u0439 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445 MapReduce. \u041f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 PageRank \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 KV-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0442\u0430\u043a\u043e\u0435 \u043a\u0430\u043a FastFields \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 Tantivy \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>  \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043d\u0430\u0443\u0447\u043d\u044b\u043c \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Impact_factor\" rel=\"nofollow noopener noreferrer\">\u0438\u043c\u043f\u0430\u043a\u0442-\u0444\u0430\u043a\u0442\u043e\u0440<\/a> \u0438\u043b\u0438 \u0438\u043d\u0434\u0435\u043a\u0441 \u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h3><font color=\"#cc0000\">\u0412\u0442\u043e\u0440\u0430\u044f \u0444\u0430\u0437\u0430 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/font><\/h3>\n<p>  \u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0444\u0430\u0437\u0435 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0433\u0434\u0435 \u0440\u0430\u0437\u043e\u0433\u043d\u0430\u0442\u044c\u0441\u044f. \u041d\u0430 \u0440\u0443\u043a\u0430\u0445 \u0443 \u0432\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u043e\u0442\u0435\u043d \u0434\u043e \u0442\u044b\u0441\u044f\u0447 \u0431\u043e\u043b\u0435\u0435 \u0438\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0430\u0437\u044b. \u0412\u0441\u0451 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u0434\u043e \u0434\u0435\u0434\u043b\u0430\u0439\u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0434\u043e\u043b\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b) \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0431\u0430\u0437 \u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0439. <\/p>\n<p>  \u041f\u043e\u0434\u0442\u044f\u043d\u0438\u0442\u0435 \u0438\u0437 \u0432\u0430\u0448\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0430\u0437\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043b\u0438\u043a\u0430\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 \u2014 \u0440\u0430\u0437\u0432\u043b\u0435\u043a\u0430\u0439\u0442\u0435\u0441\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u0435\u0442\u0435. \u0412\u044b \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430 \u043b\u0435\u0442\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e BM25, \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432\u0430\u043c \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u043e\u0441\u043b\u0435 \u043f\u044f\u0442\u043d\u0438\u0447\u043d\u044b\u0445 \u0432\u043e\u0437\u043b\u0438\u044f\u043d\u0438\u0439. \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u043d\u0436\u0438\u0440\u0443\u044e\u0449\u0435\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0438\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0444\u0430\u0437\u044b \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043d\u043e\u0432\u043e\u0439 \u043c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0442\u0430\u043a\u0436\u0435 \u0432\u0430\u0436\u043d\u044b\u043c \u0434\u043b\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u044b\u0434\u0430\u0447\u0438.<\/p>\n<h2><font color=\"#cc0000\">\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0438\u0441\u043a\u0430<\/font><\/h2>\n<p>  \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0437\u0434\u0435\u0441\u044c \u044f \u043b\u0438\u0448\u044c \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u043f\u0430\u0440\u0443 \u0441\u0441\u044b\u043b\u043e\u043a \u0438 \u0434\u0430\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u2014 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0439 \u0437\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432\u044b\u043a\u0430\u0442\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u041b\u044e\u0431\u0430\u044f \u043c\u0435\u0442\u0440\u0438\u043a\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u0435\u0439 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043c\u0435\u0440\u0435. \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435.<\/p>\n<p>  \u041d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u044e\u0431\u043e\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430. \u041d\u043e \u0447\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u0432\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435\u0441\u044c \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043c\u0435\u0442\u0440\u0438\u043a\u0438.<\/p>\n<p>  \u0412\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u043e\u0432. \u0414\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c: \u0441\u043f\u0438\u0441\u043e\u043a <i>DID<\/i> \u0432\u044b\u0434\u0430\u0447\u0438 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438, <i>DID<\/i> \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u043b\u0438\u043a\u043d\u0443\u0442\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u0435\u0441\u0441\u0438\u0439. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0441\u0430, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u044e\u0449\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0441\u0441\u0438\u0438. \u0422\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0435\u0441\u0441\u0438\u0438 \u0440\u043e\u0431\u043e\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0432\u0435\u0441\u0430 \u0441\u0435\u0441\u0441\u0438\u044f\u043c \u0430\u0441\u0435\u0441\u0441\u043e\u0440\u043e\u0432 (\u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c). <\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0430\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u043c \u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c. \u041e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 Clickhouse \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u043e\u0432.<\/p>\n<p>  <b><font color=\"#cc0000\">Success Rate<\/font><\/b><\/p>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435 \u2014 \u043d\u0430\u0448\u0451\u043b \u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0443 \u0432\u0430\u0441 \u0445\u043e\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0435\u0441\u0441\u0438\u0438.   <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">SQL-\u0441\u043d\u0438\u043f\u043f\u0435\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"pgsql\">with 1.959964 as z select     t,     round(success_rt + z*z\/(2*cnt_sess) - z*sqrt((success_rt*(1 - success_rt) + z*z\/(4*cnt_sess))\/cnt_sess)\/(1 + z*z\/cnt_sess), 5) as success_rate__lower,     round(success_rt, 5) as success_rate,     round(success_rt + z*z\/(2*cnt_sess) + z*sqrt((success_rt*(1 - success_rt) + z*z\/(4*cnt_sess))\/cnt_sess)\/(1 + z*z\/cnt_sess), 5) as success_rate__upper from (     select         toDateTime(toDate(min_event_datetime)) as event_datetime,         $timeSeries as t,         count(*) as cnt_sess,         avg(success) as success_rt     from (         select             user_id,             session_id,             min(event_datetime) as min_event_datetime,             max(if($yourConditionForClickEvent, 1, 0)) as success         from             $table         where             $timeFilter and             $yourConditionForSearchEvent         group by             user_id,             session_id     )     group by         t,         event_datetime ) order by       t<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <b><font color=\"#cc0000\">MAP@k<\/font><\/b><\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0435\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 MAP@k, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0443\u0433\u0438\u0445 learning-to-rank \u043c\u0435\u0442\u0440\u0438\u043a <a href=\"https:\/\/habr.com\/ru\/company\/econtenta\/blog\/303458\/\">\u0435\u0441\u0442\u044c \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0432\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0438\u0437 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a. \u041c\u0435\u0442\u0440\u0438\u043a\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0437\u0443\u0435\u0442 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0443 \u0432\u0430\u0441 top-K \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0433\u0434\u0435 K \u043e\u0431\u044b\u0447\u043d\u043e \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0432\u044b\u0434\u0430\u0447\u0438.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">SQL-\u0441\u043d\u0438\u043f\u043f\u0435\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"pgsql\">select     $timeSeries as t,     avg(if(AP_10 is null, 0, AP_10)) as MAP_10 from (     select         session_id,         min(event_datetime) as event_datetime     from (         select             session_id,             event_datetime         from             query_log         where             $timeFilter and             $yourConditionForSearchEvent     )     group by         session_id ) search left join (     select         session_id,         sum(if(position_rank.1 &lt;= 10, position_rank.2 \/ position_rank.1, 0))\/10 as AP_10     from (         select             session_id,             groupArray(toUInt32(position + 1)) as position_array_unsorted,             arrayDistinct(position_array_unsorted) as position_array_distinct,             arraySort(position_array_distinct) as position_array,             arrayEnumerate(position_array) as rank_array,             arrayZip(position_array, rank_array) as position_rank_array,             arrayJoin(position_rank_array) as position_rank         from             query_log         where             $timeFilter and             $yourConditionForClickEvent         group by             session_id     )     group by         session_id ) click on     search.session_id = click.session_id group by     t order by     t<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h2><font color=\"#cc0000\">\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: Google \u0438 \u0438\u0445 \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/font><\/h2>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zy\/sz\/ub\/zyszubflm9h-mghecvhpdobtw7y.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 6: \u0412\u043e\u0442 \u0447\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u044b \u043f\u0440\u043e\u0442\u0438\u0432 \u0438\u0445 \u0432\u043e\u043b\u0438 (\u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u043b\u043e\u043a-\u0441\u0445\u0435\u043c\u044b \u0438\u0437 Brin, 1998)<\/font><\/i><\/p>\n<p>  \u0421\u0442\u0443\u0434\u0435\u043d\u0442\u044b \u0421\u0435\u0440\u0433\u0435\u0439 \u0411\u0440\u0438\u043d \u0438 \u041b\u0430\u0440\u0440\u0438 \u041f\u0435\u0439\u0434\u0436 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Google \u0438 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043e\u043a\u043e\u043b\u043e 24 \u043c\u0438\u043b\u043b\u0438\u043e\u043d\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 1998 \u0433\u043e\u0434\u0443. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0430 Python, \u0432\u0441\u0435\u0433\u043e \u043e\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438 \u043f\u043e 3-4 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0430\u0443\u043a\u0430. \u041e\u0434\u0438\u043d \u043f\u0430\u0443\u043a \u043e\u0431\u044a\u0435\u0434\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043f\u043e 50 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u041f\u043e\u043b\u043d\u043e\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u043e 9 \u0434\u043d\u0435\u0439, \u0432\u044b\u043a\u0430\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0434 \u0441\u043e\u0442\u043d\u044e \u0413\u0411 \u0434\u0430\u043d\u043d\u044b\u0445. \u0421\u0430\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0438\u0441\u0447\u0438\u0441\u043b\u044f\u043b\u0441\u044f \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u043c\u0438 \u0413\u0411.<\/p>\n<p>  \u0412 Google \u0438\u0437\u043e\u0431\u0440\u0435\u043b\u0438 \u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u043e\u0442 \u0442\u043e\u0439, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0433\u043e\u0434 \u0432 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Lucene. \u0424\u043e\u0440\u043c\u0430\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 Google \u0431\u044b\u043b \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043a\u0430\u043a \u043f\u044f\u0442\u044c \u0440\u0443\u0431\u043b\u0435\u0439 \u0438, \u043a\u0430\u043a \u043f\u043e \u043c\u043d\u0435, \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u2014 \u0444\u0430\u0439\u043b\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Barrel. Barrel \u2014 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u0447\u0435\u0442\u0432\u0435\u0440\u043a\u0438 \u27e8<i>did, tid, offset, info<\/i>\u27e9, \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u27e8<i>did, offset<\/i>\u27e9. \u0412 \u044d\u0442\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 <i>did<\/i> \u2014 id \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, <i>tid<\/i> \u2014 id \u0442\u0435\u0440\u043c\u0430, <i>offset<\/i> \u2014 \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0442\u0435\u0440\u043c\u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435.<\/p>\n<p>  \u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u044b\u043b\u043e 64 \u0442\u0430\u043a\u0438\u0445 Barrel \u0444\u0430\u0439\u043b\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0442\u0432\u0435\u0447\u0430\u043b \u0437\u0430 \u0441\u0432\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0442\u0435\u0440\u043c\u043e\u0432 (<i>tid<\/i>). \u041d\u043e\u0432\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043d\u043e\u0432\u044b\u0439 <i>did<\/i> \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0447\u0435\u0442\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043a\u043e\u043d\u0435\u0446 Barrel \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>  \u041d\u0430\u0431\u043e\u0440 \u0442\u0430\u043a\u0438\u0445 Barrel \u0444\u0430\u0439\u043b\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u0440\u043c\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e <i>did<\/i> \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e <i>did<\/i> (\u0444\u0430\u0439\u043b\u044b \u0436\u0435 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e <i>did<\/i>). \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0438\u0437 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u2014 \u0431\u0435\u0440\u0435\u043c \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u27e8<i>tid, did<\/i>\u27e9.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ti\/go\/gt\/tigogt8phccamhp0_v8ofk_h0ai.png\"><\/div>\n<p>  <i><font color=\"#999999\">\u0420\u0438\u0441. 7: \u041f\u0435\u0440\u0435\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 Barrel-\u0444\u0430\u0439\u043b\u043e\u0432<\/font><\/i><\/p>\n<p>  \u0412\u0441\u0451! \u0415\u0449\u0451 \u0440\u0430\u0437 \u2014 \u043c\u044b \u043f\u0435\u0440\u0435\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e 64 \u0444\u0430\u0439\u043b\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0438\u0437 \u043f\u0440\u044f\u043c\u043e\u0433\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0443\u0436\u0435 \u043f\u043e <i>tid<\/i>.<\/p>\n<p>  \u0417\u0430 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c Barrel-\u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u044f\u0432\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u044e\u0442 \u0443\u0448\u0438 MapReduce \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438, \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0438 \u0437\u0430\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"https:\/\/dl.acm.org\/doi\/10.5555\/1251254.1251264\" rel=\"nofollow noopener noreferrer\">J.Dean, 2004<\/a> \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>  \u041e Google \u0432 \u043e\u0431\u0449\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e \u0432\u043a\u0443\u0441\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432. \u041d\u0430\u0447\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b <a href=\"https:\/\/doi.org\/10.1016\/s0169-7552%2898%2900110-x\" rel=\"nofollow noopener noreferrer\">Brin, 1998<\/a> \u043e\u0431 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u043f\u043e\u0438\u0441\u043a\u0430, \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0442\u044b\u043a\u0430\u0442\u044c \u0432 <a href=\"https:\/\/web.njit.edu\/~alexg\/courses\/cs345\/OLD\/F15\/solutions\/\" rel=\"nofollow noopener noreferrer\">\u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0430 \u041d\u044c\u044e-\u0414\u0436\u0435\u0440\u0441\u0438<\/a> \u0438 \u0448\u043b\u0438\u0444\u0430\u043d\u0443\u0442\u044c \u0432\u0441\u0451 <a href=\"http:\/\/research.google.com\/people\/jeff\/WSDM09-keynote.pdf\" rel=\"nofollow noopener noreferrer\">\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 J.Dean<\/a> \u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043a\u0443\u0445\u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. <\/p>\n<p>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0435 \u0432\u044b \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443, \u0430 \u0432\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0433\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0441\u044f\u0446 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u044f\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 20%, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0431\u0438\u0442 \u0441 \u043a\u0440\u0435\u0434\u0438\u0442\u043e\u043c \u0441\u043e\u0448\u043b\u0438\u0441\u044c. \u0422\u0430\u043a \u0436\u0438\u043b Google \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0433\u043e\u0434\u043e\u0432. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0443\u0436\u0435 \u0434\u043e \u0442\u043e\u0433\u043e \u0434\u043e\u0438\u0433\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u043d\u0430\u0441\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u043b\u044f\u043b\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0446\u0438\u043b\u0438\u043d\u0434\u0440\u044b HDD \u2014 \u0443 \u043d\u0438\u0445 \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432\u044b\u0448\u0435 \u0431\u044b\u043b\u0430 \u0438 \u0444\u0430\u0439\u043b\u044b \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 2021 \u0433\u043e\u0434\u0443 \u0442\u0430\u043a\u0438\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0436\u0435 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u043d\u0443\u0436\u043d\u044b. HDD \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d\u044b \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0430 \u0438\u043d\u0434\u0435\u043a\u0441, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b 2010-\u044b\u0445, \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 RAM.<\/p>\n<p>  <b><font color=\"#cc0000\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430:<\/font><\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/doi.org\/10.1016\/S0169-7552(98)00110-X\" rel=\"nofollow noopener noreferrer\">The anatomy of a large-scale hypertextual Web search engine<\/a> Brin, 1998<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/yandex\/blog\/464375\/\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/a> <a href=\"https:\/\/habr.com\/ru\/users\/iseg\/\" class=\"user_link\">iseg<\/a><\/li>\n<li><a href=\"https:\/\/dl.acm.org\/doi\/10.1145\/2682862.2682870\" rel=\"nofollow noopener noreferrer\">Compression, SIMD, and Postings Lists<\/a> Trotman, 2014<\/li>\n<li><a href=\"https:\/\/doi.org\/10.1016\/0306-4573%2895%2900020-h\" rel=\"nofollow noopener noreferrer\">Query evaluation: Strategies and optimizations<\/a> Turtle, 1995<\/li>\n<li><a href=\"https:\/\/doi.org\/10.1145\/956863.956944\" rel=\"nofollow noopener noreferrer\">Efficient query evaluation using a two-level retrieval process<\/a> Broder, 2003<\/li>\n<li><a href=\"https:\/\/doi.org\/10.1145\/2009916.2010048\" rel=\"nofollow noopener noreferrer\">Faster top-k document retrieval using block-max indexes<\/a> Ding, 2011<\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/545634\/\"> https:\/\/habr.com\/ru\/post\/545634\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sd\/vz\/ke\/sdvzkeyjgv9cvnvqvq9xvcuj3sw.jpeg\"><\/div>\n<p>  \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0431\u044c\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u043f\u043b\u0430\u043c\u0435\u043d\u043d\u043e\u0435 \u0441\u0435\u0440\u0434\u0446\u0435 \u2014 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u0418\u043c\u0435\u043d\u043d\u043e \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u0432\u0441\u0451 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0438 \u0440\u0430\u0434\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0442\u0438\u043a\u0430\u043c\u0438, \u043e\u0442\u0432\u0435\u0442\u0430\u043c \u0441 StackOverflow \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430\u043c \u043d\u0430 \u0432\u0438\u043a\u0438.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0438\u0441\u043a\u0430, \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439 \u0441 \u043e\u0442\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043a \u0442\u0435\u043e\u0440\u0438\u0438. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u043e\u043f\u044b\u0442\u043d\u043e\u0433\u043e \u043a\u0440\u043e\u043b\u0438\u043a\u0430 \u0432\u0437\u044f\u0442 <a href=\"https:\/\/github.com\/tantivy-search\/tantivy\" rel=\"nofollow noopener noreferrer\">Tantivy<\/a> \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Lucene \u043d\u0430 Rust. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439, \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u043e\u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u0441 \u0440\u0430\u0441\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u043d\u044b\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u0445\u0430\u0431\u0440\u0430 \u0437\u0430 \u0447\u0430\u0448\u043a\u043e\u0439 \u043a\u043e\u0444\u0435, \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-319970","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/319970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=319970"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/319970\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=319970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=319970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=319970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}