弹性搜索喜欢

时间:2016-03-18 06:06:36

标签: php elasticsearch

您好我想使用姓名搜索AUTHOR NAME,我的结果是这样返回的:

{
    "ABSTRACTER_ID": 8549,
    "AUTHOR_NAME": " Rombouts, George Paul, Nijmegen, Netherlands; Department of Pathology, RadboudUMC",
    "PRESENTER": null,
     "AGE_GROUP_VALUE": null,
     "STUDY_TYPE": null,
     "PHASE_TYPE": null,
     "STUDY_DESIGN_TYPE": null,
     "TRIAL_PHASE_TYPE": null
}

如果我使用" George Paul"或者" G Paul"。如何在弹性搜索中编写查询

1 个答案:

答案 0 :(得分:0)

如果AUTHOR_NAMEanalyzed,则以下查询将有效。

{
"query": {
  "query_string": {
     "default_field": "AUTHOR_NAME",
     "query": "George Paul "
    }
   }
}