elasticsearch - How to retrieve all document ids (_id) in a specific index -


i trying retrieve documents in index, while getting _id field back.

basically want retrieve document ids have.

while using:

{    "query": {        "match_all": {}    },    "fields": [] } 

the hits contain: "_index", "_type", "_id" , "_score", "_source" way more need.

edit(answer): problem used kopf run queries, , results not accurate (got _source , more..)! when using curl got correct results!

so above query achieved needed! can use:

{    "query": {       "match_all": {}    },    "_source": false, } 

or

{    "query": {       "match_all": {}    },    "fields": ["_id"] } 

for elasticsearch, can specific _source fields using fields array.

_index, _type, _id, _score must returned elasticsearch.

there no way remove them response.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -