Version of ES: 7.16.
I'm aware that "types" have more or less been phased out in v7 ... seemingly leaving only "_doc" as the endpoint after the index name. Can anyone say whether there's any difference between these 2 queries in ES 7?
search_url = f'{ES_URL}my_index/_doc/_search?q={search_string}'
or
search_url = f'{ES_URL}my_index/_search?q={search_string}'
They seem to return the same hits...
Will the second become illegal in a future ES version?
CodePudding user response:
there's no difference in 7.X, no
in 8.X the first one will error as there are no types, so only the second one will work
https://www.elastic.co/guide/en/elasticsearch/reference/8.0/removal-of-types.html and https://www.elastic.co/guide/en/elasticsearch/reference/7.16/removal-of-types.html go into that more