# Can i filter/query by \_version?

**URL:** https://discuss.elastic.co/t/can-i-filter-query-by--version/14419
**Category:** Elasticsearch
**Created:** [November 14, 2013, 8:13pm UTC](https://discuss.elastic.co/t/can-i-filter-query-by--version/14419 "2013-11-14T20:13:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dosmoney](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dosmoney](https://discuss.elastic.co/u/dosmoney)
#### Post date: [November 14, 2013, 8:13pm UTC](https://discuss.elastic.co/t/can-i-filter-query-by--version/14419/1 "2013-11-14T20:13:04Z")

</div>

I'm indexing a lot of records of type "customer" and manually setting "\_id"  
from an internal data source.  
Our internal ID should be unique but during testing I see one record having  
"\_version" : 2.

I'm trying to query all records with "\_version" greater than 1 but having a  
hard time, any ideas?

Thanks - Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [November 14, 2013, 8:23pm UTC](https://discuss.elastic.co/t/can-i-filter-query-by--version/14419/2 "2013-11-14T20:23:21Z")

</div>

The \_version field is not indexed, therefore you cannot query/filter on it.

Cheers,

Ivan

On Thu, Nov 14, 2013 at 12:13 PM, ben schulte [ben.schulte@gmail.com](mailto:ben.schulte@gmail.com) wrote:

> I'm indexing a lot of records of type "customer" and manually setting  
> "\_id" from an internal data source.  
> Our internal ID should be unique but during testing I see one record  
> having "\_version" : 2.
> 
> I'm trying to query all records with "\_version" greater than 1 but having  
> a hard time, any ideas?
> 
> Thanks - Ben
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:06am UTC](https://discuss.elastic.co/t/can-i-filter-query-by--version/14419/3 "2017-07-06T02:06:53Z")

</div>


