How to search different type at elasticsearch

Hi Team,

i have
few type at index, like _type: HKN, _type:hke,_type: uun
"_index": "news",
"_type": "hkn",

how to search the type i need.
if only one type i know as below:
POST /news/hkn/_search{}

if all type will be:
POST /news/_search{}

how about i want selected few type like "HKN and UUN"?
Thanks

You can comma-separate the types you want to search in the url like this:

POST /news/hkn,uun/_search{}

Hope that helps

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.