# Search for new documents only

**URL:** <https://discuss.elastic.co/t/search-for-new-documents-only/22743>\
**Category:** Elasticsearch\
**Created:** [March 18, 2015, 4:45pm UTC](https://discuss.elastic.co/t/search-for-new-documents-only/22743 "2015-03-18T16:45:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)\
**Post date:** [March 18, 2015, 4:45pm UTC](https://discuss.elastic.co/t/search-for-new-documents-only/22743/1 "2015-03-18T16:45:31Z")

</div>

I do have the following use case: I want to search for documents with a  
query (e.g. a time range), but only for new documents, meaning I only want  
to return documents where \_version is 1. Is there an elegant way to do this  
(\_version is not searchable, I think) or do I have to return all documents  
and check version afterwards?

Thanks!  
Andrej

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7f0fa873-e4a8-4aca-a564-e6096fe0077f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f0fa873-e4a8-4aca-a564-e6096fe0077f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:25am UTC](https://discuss.elastic.co/t/search-for-new-documents-only/22743/2 "2017-07-06T00:25:51Z")

</div>


