# ES using DocValues internally yet?

**URL:** https://discuss.elastic.co/t/es-using-docvalues-internally-yet/11455
**Category:** Elasticsearch
**Created:** [April 4, 2013, 6:31pm UTC](https://discuss.elastic.co/t/es-using-docvalues-internally-yet/11455 "2013-04-04T18:31:56Z")
**Posts on this page:** 4
**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: [April 4, 2013, 6:31pm UTC](https://discuss.elastic.co/t/es-using-docvalues-internally-yet/11455/1 "2013-04-04T18:31:56Z")

</div>

Hi,

I thought ES was using Lucene's DocValues internally, but it looks like it  
does not. Am I missing something? Looking at the wrong place? Here's  
what I see in master:

$ ffjg -i DocVal | grep -v ScriptDocVal  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
BytesRef docValue = termsIndex.getValue(doc);  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
if (docValue == null) {  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
return docValue.compareTo(value);  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
BytesRef docValue = getRelevantValue(termsIndex, doc, sortMode);  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
if (docValue == null) {  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
return docValue.compareTo(value);  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/DoubleValuesComparatorBase.java:  
final double docValue = readerValues.getValueMissing(doc,  
missingValue);  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/DoubleValuesComparatorBase.java:  
return compare(docValue, value);  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/LongValuesComparatorBase.java:  
long docValue = readerValues.getValueMissing(doc, missingValue);  
./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/LongValuesComparatorBase.java:  
return compare(docValue, value);

Qs:

- When will ES start using DocValues internally, roughly? By 1.0 or after?
- Is any info available on what sort of DocValue support will be exposed by  
ES?

## Thanks, Otis

ELASTICSERCH Performance Monitoring - [http://sematext.com/spm/index.html](http://sematext.com/spm/index.html)

--  
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: ![mattweber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattweber/32/44940_2.png) [@mattweber](https://discuss.elastic.co/u/mattweber)
#### Post date: [April 4, 2013, 6:47pm UTC](https://discuss.elastic.co/t/es-using-docvalues-internally-yet/11455/2 "2013-04-04T18:47:54Z")

</div>

Simon has a docvalues branch but it is not in master yet and probably won't  
make .90 according to him.

On Thursday, April 4, 2013, Otis Gospodnetic wrote:

> Hi,
> 
> I thought ES was using Lucene's DocValues internally, but it looks like it  
> does not. Am I missing something? Looking at the wrong place? Here's  
> what I see in master:
> 
> $ ffjg -i DocVal | grep -v ScriptDocVal  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> BytesRef docValue = termsIndex.getValue(doc);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> if (docValue == null) {  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> return docValue.compareTo(value);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> BytesRef docValue = getRelevantValue(termsIndex, doc, sortMode);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> if (docValue == null) {  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> return docValue.compareTo(value);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/DoubleValuesComparatorBase.java:  
> final double docValue = readerValues.getValueMissing(doc,  
> missingValue);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/DoubleValuesComparatorBase.java:  
> return compare(docValue, value);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/LongValuesComparatorBase.java:  
> long docValue = readerValues.getValueMissing(doc, missingValue);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/LongValuesComparatorBase.java:  
> return compare(docValue, value);
> 
> Qs:
> 
> - When will ES start using DocValues internally, roughly? By 1.0 or after?
> - Is any info available on what sort of DocValue support will be exposed  
> by ES?
> 
> ## Thanks, Otis
> 
> ELASTICSERCH Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)
> 
> --  
> 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).

--  
Thanks,  
Matt Weber

--  
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: ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)
#### Post date: [April 5, 2013, 10:16am UTC](https://discuss.elastic.co/t/es-using-docvalues-internally-yet/11455/3 "2013-04-05T10:16:51Z")

</div>

hey otis,

DocValues are not exposed yet. We decided to move the exposure to post 0.90  
to reduce the # of new features on the one hand and to get 0.90 out on the  
other.  
Regarding which features, it will be similar to what you can do with plain  
lucene while we might need to go for SortedBytes even on numeric fields  
since numerics are not multivalued.

simon

On Thursday, April 4, 2013 8:31:56 PM UTC+2, Otis Gospodnetic wrote:

> Hi,
> 
> I thought ES was using Lucene's DocValues internally, but it looks like it  
> does not. Am I missing something? Looking at the wrong place? Here's  
> what I see in master:
> 
> $ ffjg -i DocVal | grep -v ScriptDocVal  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> BytesRef docValue = termsIndex.getValue(doc);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> if (docValue == null) {  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> return docValue.compareTo(value);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> BytesRef docValue = getRelevantValue(termsIndex, doc, sortMode);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> if (docValue == null) {  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/BytesRefOrdValComparator.java:  
> return docValue.compareTo(value);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/DoubleValuesComparatorBase.java:  
> final double docValue = readerValues.getValueMissing(doc,  
> missingValue);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/DoubleValuesComparatorBase.java:  
> return compare(docValue, value);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/LongValuesComparatorBase.java:  
> long docValue = readerValues.getValueMissing(doc, missingValue);  
> ./src/main/java/org/elasticsearch/index/fielddata/fieldcomparator/LongValuesComparatorBase.java:  
> return compare(docValue, value);
> 
> Qs:
> 
> - When will ES start using DocValues internally, roughly? By 1.0 or after?
> - Is any info available on what sort of DocValue support will be exposed  
> by ES?
> 
> ## Thanks, Otis
> 
> ELASTICSERCH Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

--  
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:42am UTC](https://discuss.elastic.co/t/es-using-docvalues-internally-yet/11455/4 "2017-07-06T02:42:40Z")

</div>


