小编Mur*_*raj的帖子

如何在elasticsearch中进行精确匹配?

在这里我给出了我更新的映射

curl -X PUT localhost:9200/testing/listings/_mapping -d '{
  "listings" : {
    "properties" : {
        "address" : {
           "properties": {
              "location": { "type" : "string",
                            "index" : "not_analyzed"
               }
            }
        },
        "suggest" : { "type" : "completion",
                      "index_analyzer" : "simple",
                      "search_analyzer" : "simple",
                      "payloads" : true
        }
      }
   }
}'
Run Code Online (Sandbox Code Playgroud)

我的映射创建索引如下

{
  "testing": {
    "mappings": {
      "listings": {
        "properties": {
          "address": {
            "properties": {
              "city": {
                "type": "string"
              },
              "line1": {
                "type": "string"
              },
              "line2": {
                "type": "string"
              },
              "line3": {
                "type": …
Run Code Online (Sandbox Code Playgroud)

indexing mongodb node.js exact-match elasticsearch

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

标签 统计

elasticsearch ×1

exact-match ×1

indexing ×1

mongodb ×1

node.js ×1