小编Vol*_*ych的帖子

mysql复制跳过语句.可能吗?

有一个基于ROW复制的系统.昨天我意外地对我的主人发表了沉重的声明,发现我的奴隶远远落后于主人.我已经中断了master上的查询,但它仍然在slave上运行.所以我让我的奴隶落后大师15个小时.

我已经尝试通过重置slave并增加MASTER_LOG_POS来跳过一个位置,但没有运气:找不到位置,因为中继日志没有比重度查询事件更多地被读取.

Read_Master_Log_Pos == Exec_Master_Log_Pos
Run Code Online (Sandbox Code Playgroud)
  • 有没有办法跳过沉重的查询?(我不关心必须通过查询更改的数据)
  • 有没有办法杀死从中继日志中获取的从站的查询?
  • 有没有办法将从站回滚到1位置,从主bin-log中删除事件并恢复复制?

mysql replication

7
推荐指数
3
解决办法
2万
查看次数

Elasticsearch:在下划线上分割单词; 搜索没有任何结果

我正在配置一个tokenizer,它通过下划线char以及所有其他标点符号来分割单词.我决定使用word_delimiter过滤器.然后我将我的分析器设置为所需字段的默认值.

我有两个问题:

  • 尽管有preserve_original选项,Analyzer会将字符串拆分为单词,但不保留原始字符串.请参阅分析查询.
  • 通过下划线拆分的子串搜索仍然不会产生任何结果

这是我的模板,数据对象,分析器测试和搜索请求:

PUT simple
{
  "template" : "simple",
  "settings" : {
    "index" : {
      "analysis" : {
          "analyzer" : {
              "underscore_splits_words" : {
                  "tokenizer" : "standard",
                  "filter" : ["word_delimiter"],
                  "generate_word_parts" : true,
                  "preserve_original" : true
              }
          }
      }
    },
    "mappings": {
        "_default_": {
             "properties" : {
                "request" : { "type" : "string", "analyzer" : "underscore_splits_words" }
            }
        }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

数据对象:

POST simple/0 
{ "request" : "GET /queue/1/under_score-hyphenword/poll?ttl=300&limit=10" }
Run Code Online (Sandbox Code Playgroud)

这将返回标记:"under","score","hyphenword",但没有"underscore_splits_words":

POST simple/_analyze?analyzer=underscore_splits_words
{"/queue/1/under_score-hyphenword/poll?ttl=300&limit=10"}
Run Code Online (Sandbox Code Playgroud)

搜索结果 …

elasticsearch

4
推荐指数
1
解决办法
5027
查看次数

标签 统计

elasticsearch ×1

mysql ×1

replication ×1