ElasticSearch JSON对象

时间:2018-10-19 16:17:37

标签: hibernate spring-boot elasticsearch

前端是一个有角的dynamic-form,后端是带有MySQL和Elasticsearch中的连接的spring boot。表单(JSON类型)存储在mysql 8中。我想使用hibernate-search或任何其他建议的技术在表单的特定字段中的字段/变量中进行Elasticsearch查询

public class UserForm {
...
@Type(type = "json")
private String form;
....
}

JSON形式的结构也将有所不同

{
  "array": [
    {
      "zipCode": "13561",
      "state": "attiki",
      "city": "agioi anargiroi"
    },
    {
      "zipCode": "10432",
      "state": "attiki",
      "city": "athens"
    }
  ]
}

{
  "firstName": "thanos",
  "lastName": "keske",
  "email": "thanos.keske@gmail.com"
}

0 个答案:

没有答案