我是elasticsearch的初學者,我不知道解決我的問題。 這裏是我的問題:ElasticSearch多個字段
{"email"=>"[email protected]",
"full_name"=>"Lilla Fritz Ritchie",
"location"=>"Connecticut",
"postition"=>"Developer",
"about"=>
"Atque nihil dolorum et quod ea aut debitis. Aliquid commodi eos et architecto nostrum. Rerum aut sunt sed molestiae consequatur. Ut ut est id voluptatem maiores. Sed voluptate aut consequatur asperiores reprehenderit iure optio.",
"skills"=>
[{"name"=>"SQLServer", "year_experience"=>2},
{"name"=>"MySQL", "year_experience"=>6},
{"name"=>"Aps.net", "year_experience"=>7},
{"name"=>"Ruby on Rails", "year_experience"=>8},
{"name"=>"PHP", "year_experience"=>4},
{"name"=>"Amazon EC2", "year_experience"=>4}],
"id"=>3}
這是ES用戶的文件,我需要找到技能和相應的年經驗的人。 示例:我的投入是Ruby on Rails 8年的經驗和具有5年以上經驗的亞馬遜EC2技能。
=>期望的結果:
- 有Ruby on Rails的技巧和ORDER BY年的經驗
- 有亞馬遜EC2技能和ORDER BY年的經驗。
任何人都可以幫助我如何爲這種情況編寫ES查詢。對不起,我的英語不好。
我假設您正在尋找「我的輸入是Ruby on Rails 8年經驗和亞馬遜EC2技能以及5年經驗」的技能。 – user3775217