相关疑难解决方法(0)

在弹性搜索中索引网站/网址

我有一个website弹性搜索索引的文档字段.示例值:http://example.com.问题是,当我搜索时example,文档不包括在内.如何正确映射网站/网址字段?

我在下面创建了索引:

{
  "settings":{
    "index":{
        "analysis":{
        "analyzer":{
            "analyzer_html":{
                  "type":"custom",
                  "tokenizer": "standard",
                "filter":"standard",
                "char_filter": "html_strip"
            }
        }
        }
    }
  },
  "mapping":{
    "blogshops": {
        "properties": {
            "category": {
                "properties": {
                    "name": {
                        "type": "string"
                    }
                }
            },
            "reviews": {
                "properties": {
                    "user": {
                        "properties": {
                            "_id": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

elasticsearch

14
推荐指数
1
解决办法
2万
查看次数

标签 统计

elasticsearch ×1