0

I have gone through the following links:

  1. https://cwiki.apache.org/confluence/display/solr/DocValues
  2. lucene Fields vs. DocValues
  3. https://lucidworks.com/blog/2013/04/02/fun-with-docvalues-in-solr-4-2/

The last link by LucidWorks is a step in the right direction for newbies, but its all still very confusing.

How are docValues any different from inverted index? Example:

doc1 : "quick brown fox"
doc2 : "quick fox"
doc3 : "brown fox"

Ignoring term-vectors, a simple mental model of the inverted index for the above would be:

quick: doc1, doc2
brown: doc1, doc3
fox: doc1, doc2, doc3

Can someone explain to me how do the docValues look for the above example? And how do they benefit use-case other than simple searching?

Please assume zero knowledge of docValues and please be a little more detailed than just enumerating the benefits of docValues (as done by all the other docs).

Community
  • 1
  • 1
user2250246
  • 3,807
  • 5
  • 43
  • 71
  • I've answered some of the basics and use cases of docValues here - https://stackoverflow.com/a/51963062/1699882 – kpahwa Aug 22 '18 at 08:54

1 Answers1

0

DocValues are an "uninverted" index. In your example they would be:

doc1: brown, fox, quick
doc2: fox, quick
doc3: brown, fox

Check also this documentation section for more details: https://www.elastic.co/guide/en/elasticsearch/guide/current/docvalues.html

Dzmitry
  • 1,351
  • 1
  • 9
  • 6