# Searching versions

**URL:** https://discuss.elastic.co/t/searching-versions/13338
**Category:** Elasticsearch
**Created:** [August 27, 2013, 12:48am UTC](https://discuss.elastic.co/t/searching-versions/13338 "2013-08-27T00:48:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)
#### Post date: [August 27, 2013, 12:48am UTC](https://discuss.elastic.co/t/searching-versions/13338/1 "2013-08-27T00:48:11Z")

</div>

Is it possible to run a search on the history of versions instead of just  
the recent one? For eg:

Key 1: Version 1  
{ user : 'abc'  
age: 20  
}

Key 1: Version 2  
{  
email: [abc@d.com](mailto:abc@d.com)  
}

Now can I search on "user:abc"?

--  
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: [August 27, 2013, 1:02am UTC](https://discuss.elastic.co/t/searching-versions/13338/2 "2013-08-27T01:02:43Z")

</div>

Previous versions of a document are not available. The version field is  
also not queryable.

Cheers,

Ivan

On Mon, Aug 26, 2013 at 5:48 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> Is it possible to run a search on the history of versions instead of just  
> the recent one? For eg:
> 
> Key 1: Version 1  
> { user : 'abc'  
> age: 20  
> }
> 
> Key 1: Version 2  
> {  
> email: [abc@d.com](mailto:abc@d.com)  
> }
> 
> Now can I search on "user:abc"?
> 
> --  
> 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: ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)
#### Post date: [August 27, 2013, 3:44am UTC](https://discuss.elastic.co/t/searching-versions/13338/3 "2013-08-27T03:44:21Z")

</div>

Wondering what's the use of having versions if it can't be queried?

On Mon, Aug 26, 2013 at 6:02 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> Previous versions of a document are not available. The version field is  
> also not queryable.
> 
> Cheers,
> 
> Ivan
> 
> On Mon, Aug 26, 2013 at 5:48 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> 
> > Is it possible to run a search on the history of versions instead of just  
> > the recent one? For eg:
> > 
> > Key 1: Version 1  
> > { user : 'abc'  
> > age: 20  
> > }
> > 
> > Key 1: Version 2  
> > {  
> > email: [abc@d.com](mailto:abc@d.com)  
> > }
> > 
> > Now can I search on "user:abc"?
> > 
> > --  
> > 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).

--  
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: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [September 12, 2013, 9:54am UTC](https://discuss.elastic.co/t/searching-versions/13338/4 "2013-09-12T09:54:21Z")

</div>

Hey,

it is good for optimistic concurrency control, see  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/index_/) and  
[Optimistic concurrency control - Wikipedia](http://en.wikipedia.org/wiki/Optimistic_concurrency_control)

Hope this helps (if not, just ask),

--Alex

On Tue, Aug 27, 2013 at 5:44 AM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> Wondering what's the use of having versions if it can't be queried?
> 
> On Mon, Aug 26, 2013 at 6:02 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> > Previous versions of a document are not available. The version field is  
> > also not queryable.
> > 
> > Cheers,
> > 
> > Ivan
> > 
> > On Mon, Aug 26, 2013 at 5:48 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > 
> > > Is it possible to run a search on the history of versions instead of  
> > > just the recent one? For eg:
> > > 
> > > Key 1: Version 1  
> > > { user : 'abc'  
> > > age: 20  
> > > }
> > > 
> > > Key 1: Version 2  
> > > {  
> > > email: [abc@d.com](mailto:abc@d.com)  
> > > }
> > > 
> > > Now can I search on "user:abc"?
> > > 
> > > --  
> > > 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).
> 
> --  
> 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:16am UTC](https://discuss.elastic.co/t/searching-versions/13338/5 "2017-07-06T02:16:58Z")

</div>


