brewster / elastictastic

Object-document mapper and lightweight API adapter for ElasticSearch
MIT License
88 stars 13 forks source link

Add ::exists? to check for existence of document #14

Closed outoftime closed 12 years ago

outoftime commented 12 years ago

ES 0.19.5 supports a HEAD query to quickly check for the existence of a document. Add a Document::exists?(id) method to use that for quick checks.