【发布时间】:2017-10-21 01:12:01
【问题描述】:
我想使用 elasticsearch 搜索 my_type 的属性..
例如,在 my_type 中,我有一个名为“folder_applications”的属性:
"folder_applications": [
*[
"employer_folder_id" => 142
"status_id" => 140
"folder" => [
"id" => 142
"employer_id" => 11
]
"created_at" => "2017-04-12"
"is_applied" => 1
"hire_stage_id" => 144
],
**[
"employer_folder_id" => 7922
"status_id" => 141
"folder" => [
"id" => 7922
"employer_id" => 11
]
"created_at" => "2017-04-12"
"is_applied" => 1
"hire_stage_id" => 143
]
]
* -> first array
** -> second array
例如,我想在 my_type 中搜索 status_id => 141 的对象;
当我搜索这个时,我的搜索结果返回包含所有状态的孔文档.. 但我只想要 status_id => 141...而不是 140 或任何其他..例如我想获取 folder.id => 7922 && status_id => 141.. 搜索结果只显示我示例的第二个数组。
其他搜索也会发生这种情况。我该如何处理?
【问题讨论】:
标签: search elasticsearch types document