ES报错Result window is too large问题处理

我在使用Elasticsearch进行search查询的过程中,出现了Result window is too large问题。

Result window is too large, from + size must be less than or equal to: [10000] but was [43155]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.

Sphinx Ranking Mode(排序模式)

Ranking overview(概览)

Ranking (aka weighting) of the search results can be defined as a process of computing a so-called relevance (aka weight) for every given matched document with regards to a given query that matched it. So relevance is in the end just a number attached to every document that estimates how relevant the document is to the query. Search results can then be sorted based on this number and/or some additional parameters, so that the most sought after results would come up higher on the results page.

排序(又名加权),是基于请求匹配到的结果,计算所谓的相关性(又名权重)的一个程序。 相关性是请求结束后被附加在文档结果中的一个估算出来的数值,表示匹配的文档于请求的关键词相关的程度,然后搜索的结果就能基于这个数值和其他的一些附加的参数进行排序,这样大多数相关的结果就能排在前面。

MySQL Connection using old authentication protocol refused

有一台mysql升级到5.6版本,结果连接一些低版本的mysql服务器报出如下异常:

Warning: mysql_connect(): Connection using old (pre-4.1.1) authentication protocol refused (client option ‘secure_auth’ enabled)

异常原因在于服务器端的密码管理协议陈旧,使用的是旧有的用户密码格式存储;但是客户端升级之后采用了新的密码格式。mysql5.6版本遇到这种不一致的情况就会拒绝连接。

未知的恐惧——NULL

1
2
3
4
5
6
7
8
9
10
11
12
13
SELECT 
NULL = 0,
NULL = 12345,
NULL <> 12345,
NULL + 12345,
NULL || 'abc',
NULL = NULL ,
NULL <> NULL ,
NULL AND TRUE ,
NULL AND FALSE ,
NULL OR FALSE ,
NULL OR TRUE ,
NOT (NULL);

如果这是一道面试题,估计不知道有多少程序员甚至是DBA会阵亡。