HUE-1327 [search] disallow changing of collection index to non-existing index

- Validate collection or core
- Change collection type to core or collection based on
  whether collection or core is provided