# ExternalFileField-like functionality

**URL:** https://discuss.elastic.co/t/externalfilefield-like-functionality/5172
**Category:** Elasticsearch
**Created:** [August 16, 2011, 11:54am UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172 "2011-08-16T11:54:02Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)
#### Post date: [August 16, 2011, 11:54am UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/1 "2011-08-16T11:54:02Z")

</div>

Hi,

In our engagements with our Solr customers we've successfully used  
ExternalFileField (see [http://search-lucene.com/q=ExternalFileField](http://search-lucene.com/q=ExternalFileField) )  
to handle situations where a numeric/float field needed to be updated  
frequently while avoiding having to update the whole document. I'm  
wondering what functionality one can use in ES to achieve the same  
effect?

## Thanks, Otis

Sematext is hiring Search Engineers -- [http://sematext.com/about/jobs.html](http://sematext.com/about/jobs.html)

---

<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: [August 16, 2011, 12:12pm UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/2 "2011-08-16T12:12:29Z")

</div>

Heya Otis,

```
Yes, there are plans to try and support something similar, but quite

```

different 🙂 in how its going to work than the external field feature (not a  
fan of the it, personally). Note though, its a big feature, so it will take  
some time to make it happen.

On Tue, Aug 16, 2011 at 2:54 PM, Otis Gospodnetic \<  
[otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com)\> wrote:

> Hi,
> 
> In our engagements with our Solr customers we've successfully used  
> ExternalFileField (see [http://search-lucene.com/q=ExternalFileField](http://search-lucene.com/q=ExternalFileField) )  
> to handle situations where a numeric/float field needed to be updated  
> frequently while avoiding having to update the whole document. I'm  
> wondering what functionality one can use in ES to achieve the same  
> effect?
> 
> ## Thanks, Otis
> 
> Sematext is hiring Search Engineers -- [Jobs - Sematext](http://sematext.com/about/jobs.html)

---

<div class="post-metadata">

### Author: ![Andy\_2](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Andy\_2](https://discuss.elastic.co/u/Andy_2)
#### Post date: [August 17, 2011, 1:20am UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/3 "2011-08-17T01:20:52Z")

</div>

I've looked into ExternalFileField in Solr and couldn't figure out a  
way to make it work efficently.

The problem is that all those int/float values need to be stored in a  
single file. So if I have 100 million documents, I'd need to have a  
file with 100 million doc\_id/value pairs in it. Then if I want to  
update the value of just 1 document, how do I update that external  
file? Do I go to the database and export the entire 100 million id/v  
pairs to a new external file that overwrite the old file? That would  
be extremely inefficient.

Otis -  
Can you explain how did you update the external file when you used  
ExternalFileField?

Shay -  
Can you share a bit about what you have in mind? Hopefully it wouldn't  
be too similar to ExternalFileField. Ideally it'd be just like  
updating a RDBMS where I can atomically update/increment a specific  
field without having to use external file. Don't know if that's  
technically possible...

Andy

On Aug 16, 8:12 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Heya Otis,
> 
> ```
> Yes, there are plans to try and support something similar, but quite
> 
> ```
> 
> different 🙂 in how its going to work than the external field feature (not a  
> fan of the it, personally). Note though, its a big feature, so it will take  
> some time to make it happen.
> 
> On Tue, Aug 16, 2011 at 2:54 PM, Otis Gospodnetic \<
> 
> [otis.gospodne...@gmail.com](mailto:otis.gospodne...@gmail.com)\> wrote:
> 
> > Hi,
> 
> > In our engagements with our Solr customers we've successfully used  
> > ExternalFileField (seehttp://search-lucene.com/q=ExternalFileField)  
> > to handle situations where a numeric/float field needed to be updated  
> > frequently while avoiding having to update the whole document. I'm  
> > wondering what functionality one can use in ES to achieve the same  
> > effect?
> 
> > ## Thanks, Otis
> > 
> > Sematext is hiring Search Engineers --[Jobs - Sematext](http://sematext.com/about/jobs.html)

---

<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: [August 17, 2011, 1:53am UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/4 "2011-08-17T01:53:55Z")

</div>

Andy, you nailed the problem with external field, and thats not talking  
about how to make it work with a dynamic distributed environment. I have a  
different model in mind, but, its pretty rough and not complete, hard to  
share it now... 🙂

On Wed, Aug 17, 2011 at 4:20 AM, Andy [selforganized@gmail.com](mailto:selforganized@gmail.com) wrote:

> I've looked into ExternalFileField in Solr and couldn't figure out a  
> way to make it work efficently.
> 
> The problem is that all those int/float values need to be stored in a  
> single file. So if I have 100 million documents, I'd need to have a  
> file with 100 million doc\_id/value pairs in it. Then if I want to  
> update the value of just 1 document, how do I update that external  
> file? Do I go to the database and export the entire 100 million id/v  
> pairs to a new external file that overwrite the old file? That would  
> be extremely inefficient.
> 
> Otis -  
> Can you explain how did you update the external file when you used  
> ExternalFileField?
> 
> Shay -  
> Can you share a bit about what you have in mind? Hopefully it wouldn't  
> be too similar to ExternalFileField. Ideally it'd be just like  
> updating a RDBMS where I can atomically update/increment a specific  
> field without having to use external file. Don't know if that's  
> technically possible...
> 
> Andy
> 
> On Aug 16, 8:12 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Heya Otis,
> > 
> > ```
> > Yes, there are plans to try and support something similar, but quite
> > 
> > ```
> > 
> > different 🙂 in how its going to work than the external field feature  
> > (not a  
> > fan of the it, personally). Note though, its a big feature, so it will  
> > take  
> > some time to make it happen.
> > 
> > On Tue, Aug 16, 2011 at 2:54 PM, Otis Gospodnetic \<
> > 
> > [otis.gospodne...@gmail.com](mailto:otis.gospodne...@gmail.com)\> wrote:
> > 
> > > Hi,
> > 
> > > In our engagements with our Solr customers we've successfully used  
> > > ExternalFileField (seehttp://search-lucene.com/q=ExternalFileField)  
> > > to handle situations where a numeric/float field needed to be updated  
> > > frequently while avoiding having to update the whole document. I'm  
> > > wondering what functionality one can use in ES to achieve the same  
> > > effect?
> > 
> > > ## Thanks, Otis
> > > 
> > > Sematext is hiring Search Engineers --  
> > > [Jobs - Sematext](http://sematext.com/about/jobs.html)

---

<div class="post-metadata">

### Author: ![darkyoung](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darkyoung/32/2924_2.png) [@darkyoung](https://discuss.elastic.co/u/darkyoung)
#### Post date: [April 12, 2012, 1:45am UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/5 "2012-04-12T01:45:09Z")

</div>

It's great if ES has similar feature!

在 2011年8月16日星期二UTC+8下午7时54分02秒，Otis Gospodnetic写道：

> Hi,
> 
> In our engagements with our Solr customers we've successfully used  
> ExternalFileField (see [http://search-lucene.com/q=ExternalFileField](http://search-lucene.com/q=ExternalFileField) )  
> to handle situations where a numeric/float field needed to be updated  
> frequently while avoiding having to update the whole document. I'm  
> wondering what functionality one can use in ES to achieve the same  
> effect?
> 
> ## Thanks, Otis
> 
> Sematext is hiring Search Engineers -- [Jobs - Sematext](http://sematext.com/about/jobs.html)

在 2011年8月16日星期二UTC+8下午7时54分02秒，Otis Gospodnetic写道：

> Hi,
> 
> In our engagements with our Solr customers we've successfully used  
> ExternalFileField (see [http://search-lucene.com/q=ExternalFileField](http://search-lucene.com/q=ExternalFileField) )  
> to handle situations where a numeric/float field needed to be updated  
> frequently while avoiding having to update the whole document. I'm  
> wondering what functionality one can use in ES to achieve the same  
> effect?
> 
> ## Thanks, Otis
> 
> Sematext is hiring Search Engineers -- [Jobs - Sematext](http://sematext.com/about/jobs.html)

---

<div class="post-metadata">

### Author: ![vijaymohan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijaymohan/32/10390_2.png) [@vijaymohan](https://discuss.elastic.co/u/vijaymohan)
#### Post date: [June 18, 2016, 7:20pm UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/6 "2016-06-18T19:20:50Z")

</div>

Elastic search has any alternate solution for this? In our project we use the external fields to store page views and some other frequently updating data and use that value to sort the overall result, its works perfect in solr, but now I am migrating our entire solr infrastructure to ES. Please guide me, how can i replace external file fields in ES...

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [June 19, 2016, 8:58pm UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/7 "2016-06-19T20:58:51Z")

</div>

For page views, use doc values, like

```auto
"page_views": {
  "type": "integer",
  "index": "no",
  "fielddata": {
    "format": "doc_values"
  }
}

```

See

> **[Disk-Based Field Data a.k.a. Doc Values
	  	 | Elastic](https://www.elastic.co/de/blog/disk-based-field-data-a-k-a-doc-values)**
>
> Elasticsearch is not just about full-text search, and many users are actually not using Elasticsearch for full-text search at all but for analytics though facets. This approach works well, but, as you...

---

<div class="post-metadata">

### Author: ![vijaymohan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijaymohan/32/10390_2.png) [@vijaymohan](https://discuss.elastic.co/u/vijaymohan)
#### Post date: [June 19, 2016, 9:22pm UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/8 "2016-06-19T21:22:43Z")

</div>

But I don't want to update the index every 5 10 mts, that may slow down queries to the same index right? That's the reason I was keeping it in external file field.

Do you think it will be a issue when I update the index while other clients querying the same index?

---

<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 5, 2017, 10:42pm UTC](https://discuss.elastic.co/t/externalfilefield-like-functionality/5172/9 "2017-07-05T22:42:30Z")

</div>


