You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Brent <br...@gmail.com> on 2016/10/25 22:41:14 UTC

Does _version_ field in schema need to be indexed and/or stored?

I know that in the sample config sets, the _version_ field is indexed and not
stored, like so:

<field name="_version_" type="long" indexed="true" stored="false"/>

Is there any reason it needs to be indexed? I'm able to create collections
and use them with it not indexed, but I wonder if it negatively impacts
performance.



--
View this message in context: http://lucene.472066.n3.nabble.com/Does-version-field-in-schema-need-to-be-indexed-and-or-stored-tp4303036.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Does _version_ field in schema need to be indexed and/or stored?

Posted by Yonik Seeley <ys...@gmail.com>.
On Tue, Oct 25, 2016 at 6:41 PM, Brent <br...@gmail.com> wrote:
> I know that in the sample config sets, the _version_ field is indexed and not
> stored, like so:
>
> <field name="_version_" type="long" indexed="true" stored="false"/>
>
> Is there any reason it needs to be indexed?

It may depend on your solr version, but the starting configsets
currently only have docvalues:

./solr/server/solr/configsets/basic_configs/conf/managed-schema:
<field name="_version_" type="long" indexed="false" stored="false"/>

-Yonik

Re: Does _version_ field in schema need to be indexed and/or stored?

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Did you try using optimistic concurrency or SolrCloud? It should NOT
work if I understand what's going on correctly.

And if you don't index and don't store (and don't docValue), you don't
actually have that field active. That's how the dynamicField
*/false/false/false works to avoid unknown fields causing exception
during indexing.

Regards,
   Alex.
----
Solr Example reading group is starting November 2016, join us at
http://j.mp/SolrERG
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 25 October 2016 at 17:41, Brent <br...@gmail.com> wrote:
> I know that in the sample config sets, the _version_ field is indexed and not
> stored, like so:
>
> <field name="_version_" type="long" indexed="true" stored="false"/>
>
> Is there any reason it needs to be indexed? I'm able to create collections
> and use them with it not indexed, but I wonder if it negatively impacts
> performance.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Does-version-field-in-schema-need-to-be-indexed-and-or-stored-tp4303036.html
> Sent from the Solr - User mailing list archive at Nabble.com.