two questions regarding searching _id
field:
I want to find if specific id exists using elastic4s dsl. the aquivilent to this query elasticsearch API:
curl -XGET 'http://localhost:9200/indexName/indexType/_search/exists?q=_id:foo'
I tried to do something like this :
client execute search(indexName / indexType) query ("_id", "foo")
but this yields SearchDefinition
which cannot be checked by isExists
I want to fetch all
_id
's so far I got this solution but I am not sure that this is the idomatic way to do itclient.execute(search(indexName / indexType) query "id").map(.ids)