【问题标题】:Elasticsearch char_filter replace any character with whitespace?Elasticsearch char_filter 用空格替换任何字符?
【发布时间】:2013-03-08 05:55:45
【问题描述】:

我正在为我的 Ruby on Rails 应用程序使用 elasticsearch。我想用char_filter 来替换一些空白字符。

在 elasticsearch 教程中它说:

"mappings" : ["ph=>f", "qu=>q"]

我尝试了以下方法:

"mappings" : ["ph=>\s", "qu=>\s"]

但它似乎不起作用。有什么想法吗?

【问题讨论】:

    标签: elasticsearch tire


    【解决方案1】:

    您可以对空格使用 \uXXXX 表示法:

    "mappings" : ["ph=>\s", "qu=>\\u0020"]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-16
      • 1970-01-01
      • 2020-12-19
      • 2013-05-01
      • 1970-01-01
      • 2017-10-15
      相关资源
      最近更新 更多