# Real time update to meta information of a document

**URL:** <https://discuss.elastic.co/t/real-time-update-to-meta-information-of-a-document/4105>\
**Category:** Elasticsearch\
**Created:** [March 15, 2011, 10:36pm UTC](https://discuss.elastic.co/t/real-time-update-to-meta-information-of-a-document/4105 "2011-03-15T22:36:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)\
**Post date:** [March 15, 2011, 10:36pm UTC](https://discuss.elastic.co/t/real-time-update-to-meta-information-of-a-document/4105/1 "2011-03-15T22:36:48Z")

</div>

Hi all,

I'm researching the possibility to use ES as our primary search engine  
and I'm running into a couple of issues. In my scenario the documents  
look something like this (for example):  
{  
id: 1  
some\_text\_fields: "some text"  
some\_meta\_numbers : [1,2,3,]  
}

When a new document is added to the index it is OK it will only be  
visible through search after a minute. However, sometimes the numbers  
in the some\_meta\_numbers change and I need this change to be  
immediately visible. In other words, if a search is done after these  
numbers have been modified, it should immediately reflect the change.  
For example for all documents have 1 as number should not return a  
document whose number 1 has been remove a couple of milliseconds  
before.

Is this possible?

Thanks for your help,  
Boaz

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 15, 2011, 11:18pm UTC](https://discuss.elastic.co/t/real-time-update-to-meta-information-of-a-document/4105/2 "2011-03-15T23:18:59Z")

</div>

It is possible, you can add a refresh flag to the index request and set it to true. Note though, that this will slow down indexing.  
On Wednesday, March 16, 2011 at 12:36 AM, Boaz Leskes wrote:

> Hi all,
> 
> I'm researching the possibility to use ES as our primary search engine  
> and I'm running into a couple of issues. In my scenario the documents  
> look something like this (for example):  
> {  
> id: 1  
> some\_text\_fields: "some text"  
> some\_meta\_numbers : [1,2,3,]  
> }
> 
> When a new document is added to the index it is OK it will only be  
> visible through search after a minute. However, sometimes the numbers  
> in the some\_meta\_numbers change and I need this change to be  
> immediately visible. In other words, if a search is done after these  
> numbers have been modified, it should immediately reflect the change.  
> For example for all documents have 1 as number should not return a  
> document whose number 1 has been remove a couple of milliseconds  
> before.
> 
> Is this possible?
> 
> Thanks for your help,  
> Boaz

---

<div class="post-metadata">

**Author:** ![Boaz\_Leskes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boaz_leskes/32/723_2.png) [@Boaz\_Leskes](https://discuss.elastic.co/u/Boaz_Leskes)\
**Post date:** [March 16, 2011, 1:45pm UTC](https://discuss.elastic.co/t/real-time-update-to-meta-information-of-a-document/4105/3 "2011-03-16T13:45:06Z")

</div>

Thanks.

I'm OK with slowing down background indexing of new documents, but  
will this scale for say processing 50 changes to the meta numbers a  
second on a single shard?

Boaz

On Mar 16, 12:18 am, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> It is possible, you can add a refresh flag to the index request and set it to true. Note though, that this will slow down indexing.
> 
> On Wednesday, March 16, 2011 at 12:36 AM, Boaz Leskes wrote:
> 
> > Hi all,
> 
> > I'm researching the possibility to use ES as our primary search engine  
> > and I'm running into a couple of issues. In my scenario the documents  
> > look something like this (for example):  
> > {  
> > id: 1  
> > some\_text\_fields: "some text"  
> > some\_meta\_numbers : [1,2,3,]  
> > }
> 
> > When a new document is added to the index it is OK it will only be  
> > visible through search after a minute. However, sometimes the numbers  
> > in the some\_meta\_numbers change and I need this change to be  
> > immediately visible. In other words, if a search is done after these  
> > numbers have been modified, it should immediately reflect the change.  
> > For example for all documents have 1 as number should not return a  
> > document whose number 1 has been remove a couple of milliseconds  
> > before.
> 
> > Is this possible?
> 
> > Thanks for your help,  
> > Boaz

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 16, 2011, 5:33pm UTC](https://discuss.elastic.co/t/real-time-update-to-meta-information-of-a-document/4105/4 "2011-03-16T17:33:56Z")

</div>

Hard to tell, depends on a lot of factors such as machine type, number of docs. You will need to test it.  
On Wednesday, March 16, 2011 at 3:45 PM, Boaz Leskes wrote:

> Thanks.
> 
> I'm OK with slowing down background indexing of new documents, but  
> will this scale for say processing 50 changes to the meta numbers a  
> second on a single shard?
> 
> Boaz
> 
> On Mar 16, 12:18 am, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > It is possible, you can add a refresh flag to the index request and set it to true. Note though, that this will slow down indexing.
> > 
> > On Wednesday, March 16, 2011 at 12:36 AM, Boaz Leskes wrote:
> > 
> > > Hi all,
> > 
> > > I'm researching the possibility to use ES as our primary search engine  
> > > and I'm running into a couple of issues. In my scenario the documents  
> > > look something like this (for example):  
> > > {  
> > > id: 1  
> > > some\_text\_fields: "some text"  
> > > some\_meta\_numbers : [1,2,3,]  
> > > }
> > 
> > > When a new document is added to the index it is OK it will only be  
> > > visible through search after a minute. However, sometimes the numbers  
> > > in the some\_meta\_numbers change and I need this change to be  
> > > immediately visible. In other words, if a search is done after these  
> > > numbers have been modified, it should immediately reflect the change.  
> > > For example for all documents have 1 as number should not return a  
> > > document whose number 1 has been remove a couple of milliseconds  
> > > before.
> > 
> > > Is this possible?
> > 
> > > Thanks for your help,  
> > > Boaz

---

<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, 4:09am UTC](https://discuss.elastic.co/t/real-time-update-to-meta-information-of-a-document/4105/5 "2017-07-06T04:09:57Z")

</div>


