what does _doc represents in elasticsearch?

后端 未结 3 2073
鱼传尺愫
鱼传尺愫 2020-12-25 13:20

I am still trying to figure out what does _doc represents in elasticsearch? From the documentation, two places I could find it\'s usage are:

  1. While in sortin

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-25 13:42

    I believe these two use cases are not using the _doc terminology for the same purpose:

    1. The keyword _doc for sorting is new in Elasticsearch 2 and is a replacement for the old scan and scroll way to efficiently paginate deep into the results of a query. There is no actual _doc field in the documents.

    2. The _doc syntax to be used in the _source portion of a search (or get, update, etc) request has not been implemented as shown at the beginning of that git discussion, but using the fielddata_fields field instead. It has nothing to do with the usage of _doc in sorting.

    In the scripting documentation you'll find a section about document field data, that is extremely fast to read as it is stored in memory and is accessible using a similar doc syntax (that might add to the confusion).

提交回复
热议问题