There is one advantage to setting DocValues=true, if the application frequently updates documents. Pulling this value from a DV will be faster than stored fields. The latter need to be decompressed, filter all but the _version_ field etc.
indexed=true is only needed if Solr needs to know which document is associated with a certain version value. I don't know if it does though... Shai On Jun 22, 2015 7:23 PM, "Reitzel, Charles" <charles.reit...@tiaa-cref.org> wrote: > I think where Ishan is going with his question is this: > > 1. _*version*_ never needs to be searchable, thus, indexed=false > makes sense. > > 2. _*version*_ typically needs to be evaluated with performing an > update and, possibly, delete, thus stored=true makes sense. > > 3. _*version*_ would never be used for either sorting or faceting. > > 4. Given the above, is using docValues=true for _*version*_ a good > idea? > > > > Looking at the documentation: > > https://cwiki.apache.org/confluence/display/solr/DocValues > > > > And a bit more background: > > http://lucidworks.com/blog/fun-with-docvalues-in-solr-4-2/ > > > > My take is a simple “no”. Since docValues is, in essence, column > oriented storage (and can be seen, I think, as an alternate index format), > what benefit is to be gained for the _*version*_ field. The primary > benefits of docValues are in the sorting and faceting operations (maybe > grouping?). These operations are never performed on the _*version*_ > field, are they? > > > > I guess my remaining question is does it make sense to set indexed=”false” > on _*version*_? The example schemas set indexed=true. Does solr > itself perform searches internally on _*version*_? If so, then > indexed=true is required. But otherwise, it seems like useless overhead. > > > > Note, I have been using optimistic concurrency control in one application > and, so, am interested in this possible optimization. Any changes in this > space between 4.x and 5.x? > > > > Thanks, > > Charlie > > > > *From:* Joel Bernstein [mailto:joels...@gmail.com] > *Sent:* Monday, June 22, 2015 11:55 AM > *To:* lucene dev > *Subject:* Re: Version field as DV > > > > In general DocValues were built to support large scale random access use > cases such as faceting and sorting. They have similar performance > characteristics as the FieldCache. But unlike the FieldCache you can trade > off memory and performance by selecting different DocValues formats. > > > Joel Bernstein > > http://joelsolr.blogspot.com/ > > > > On Mon, Jun 22, 2015 at 10:41 AM, Ishan Chattopadhyaya < > ichattopadhy...@gmail.com> wrote: > > Hi all, > I am looking to try out _version_ as a docvalue (SOLR-6337) as a precursor > to SOLR-5944. Towards that, I want the _version_ field to be > stored=indexed=false, docValues=true. > > Does someone know about the performance implications of retrieving the > _version_ as a docvalue, e.g. accessing docvalue vs. a stored field? Is > there any known inefficiency when using a docvalue (as opposed to a stored > field) due to random disk seeks, for example? > > Regards, > > Ishan > > > > > ************************************************************************* > This e-mail may contain confidential or privileged information. > If you are not the intended recipient, please notify the sender > immediately and then delete it. > > TIAA-CREF > ************************************************************************* >