ElasticSearch Multi Search查询不返回结果

时间:2018-05-04 12:47:39

标签: elasticsearch

我是ElasticSearch的新手并且正在运行版本。 2.3.5。

我正在运行此查询:

{
"query" : {
    "multi_match" : {
        "type" : "cross_fields",
        "query" : "John Schmidt Sankt Boulevard 118b 2554 Island",
        "minimum_should_match" : "50%",
        "operator" : "and",
        "fields" : ["*Name", "*Street.*hasStringValue", "*hasStreetNumber", "*hasPostCode", "*PostalLocality.*hasStringValue"]
    }
}

}

然而,它不会返回任何结果。如果我从查询中删除查询后的'b',则返回文档。

所有其他字段都匹配,那么如何让ElasticSearch返回文档?

以下是映射:

    {
  "my_index" : {
    "mappings" : {
      "datasubject" : {
        "properties" : {
          "@context" : {
            "properties" : {
              "con" : {
                "type" : "string"
              },
              "cor" : {
                "type" : "string"
              },
              "geo" : {
                "type" : "string"
              },
              "per" : {
                "type" : "string"
              }
            }
          },
          "cor:Person" : {
            "properties" : {
              "con:hasContactPoint" : {
                "properties" : {
                  "con:Mobile" : {
                    "properties" : {
                      "con:hasAreaCode" : {
                        "type" : "string"
                      },
                      "con:hasCompleteTelephoneNumberString" : {
                        "type" : "string"
                      },
                      "con:hasCountryCode" : {
                        "type" : "string"
                      }
                    }
                  },
                  "con:PostalAddress" : {
                    "properties" : {
                      "con:hasAddressPoint" : {
                        "properties" : {
                          "geo:StreetAddress" : {
                            "properties" : {
                              "con:hasPostCode" : {
                                "type" : "string"
                              },
                              "con:hasPostalLocality" : {
                                "properties" : {
                                  "geo:PostalLocality" : {
                                    "properties" : {
                                      "cor:hasStringValue" : {
                                        "type" : "string"
                                      }
                                    }
                                  }
                                }
                              },
                              "geo:hasStreet" : {
                                "properties" : {
                                  "geo:Street" : {
                                    "properties" : {
                                      "cor:hasStringValue" : {
                                        "type" : "string"
                                      }
                                    }
                                  }
                                }
                              },
                              "geo:hasStreetNumber" : {
                                "type" : "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "cor:hasBirthDate" : {
                "properties" : {
                  "cor:Date" : {
                    "properties" : {
                      "cor:hasDateValue" : {
                        "type" : "date",
                        "format" : "strict_date_optional_time||epoch_millis"
                      }
                    }
                  }
                }
              },
              "cor:hasName" : {
                "properties" : {
                  "per:Name" : {
                    "properties" : {
                      "per:familyName" : {
                        "type" : "string"
                      },
                      "per:givenName" : {
                        "type" : "string"
                      }
                    }
                  }
                }
              },
              "cor:isIdentifiedBy" : {
                "properties" : {
                  "cor:GEDIvA" : {
                    "properties" : {
                      "cor:hasCompleteIdentifierValue" : {
                        "type" : "string"
                      }
                    }
                  },
                  "dataset/pdi:IndividualId" : {
                    "properties" : {
                      "cor:hasCompleteIdentifierValue" : {
                        "type" : "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

以下是索引设置:

    {
  "gdprui" : {
    "settings" : {
      "index" : {
        "creation_date" : "1525442279108",
        "analysis" : {
          "filter" : {
            "my_ascii_folding" : {
              "type" : "asciifolding",
              "preserve_original" : "true"
            },
            "substring" : {
              "type" : "edgeNGram",
              "min_gram" : "1",
              "max_gram" : "10"
            }
          },
          "analyzer" : {
            "default" : {
              "filter" : [ "standard", "my_ascii_folding", "lowercase", "substring", "reverse" ],
              "tokenizer" : "standard"
            }
          }
        },
        "number_of_shards" : "5",
        "number_of_replicas" : "2",
        "uuid" : "EMqhJwGWRKi1F5gFwuSKTQ",
        "version" : {
          "created" : "2030599"
        }
      }
    }
  }
}

0 个答案:

没有答案
相关问题