You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by shacky <sh...@gmail.com> on 2021/04/23 10:09:59 UTC

Unable to create core: _version_ field must exist in schema and be searchable and retrievable and not multiValued

Hi,
I'm creating a new core on a newly installed Solr 8.8.2 and I'm trying to
porting my very old schema which I was using on my previous Solr 1.4
installation.

On my old schema I removed some deprecated field types and the deprecated
parameter "enablePositionIncrements" plus the "defaultSearchField" and the
"solrQueryParser/@defaultOperator".

Now Solr is reporting that the _version_ field is missing:

=========================================================
Error CREATEing SolrCore 'newcore': Unable to create core [newcore] Caused
by: _version_ field must exist in schema and be searchable (indexed or
docValues) and retrievable(stored or docValues) and not multiValued
(_version_ not retrievable
=========================================================

This happens even if I've already added the _version_ field into the schema:

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

Could you help me please?

Thank you very much!
Bye

RE: Unable to create core: _version_ field must exist in schema and besearchable and retrievable and not multiValued

Posted by ufuk yılmaz <uy...@vivaldi.net.INVALID>.
Hi, what is your configuration for the “long” field type?

Also error says “_version_ not retrievable”
A field can be retrievable in 2 ways:
1) Marking it with stored=”true” (yours is not)
2) Marking it with docValues=”true” and having useDocValuesAsStored flag set to true in schema too

My configuration for reference is like:

<!-- for schema versions >= 1.6, the default value for useDocValuesAsStored is "true", so Solr uses them where available -->
<fieldType name="plong" class="solr.LongPointField" stored="false" docValues="true"/>
<field name="_version_" type="plong" indexed="true"/>

My schema version is 1.6 so as you can see I’m using the option 2.

cheers

Sent from Mail for Windows 10

From: shacky
Sent: 23 April 2021 13:10
To: solr-user
Subject: Unable to create core: _version_ field must exist in schema and besearchable and retrievable and not multiValued

Hi,
I'm creating a new core on a newly installed Solr 8.8.2 and I'm trying to
porting my very old schema which I was using on my previous Solr 1.4
installation.

On my old schema I removed some deprecated field types and the deprecated
parameter "enablePositionIncrements" plus the "defaultSearchField" and the
"solrQueryParser/@defaultOperator".

Now Solr is reporting that the _version_ field is missing:

=========================================================
Error CREATEing SolrCore 'newcore': Unable to create core [newcore] Caused
by: _version_ field must exist in schema and be searchable (indexed or
docValues) and retrievable(stored or docValues) and not multiValued
(_version_ not retrievable
=========================================================

This happens even if I've already added the _version_ field into the schema:

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

Could you help me please?

Thank you very much!
Bye


Re: Unable to create core: _version_ field must exist in schema and be searchable and retrievable and not multiValued

Posted by Walter Underwood <wu...@wunderwood.org>.
I would start with the sample 8.x schema and port your fields into that.

I’m doing a bunch of migrations from 4.10.4 and 6.6.2 and doing that
for both schema.xml and solrconfig.xml.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On Apr 23, 2021, at 3:09 AM, shacky <sh...@gmail.com> wrote:
> 
> Hi,
> I'm creating a new core on a newly installed Solr 8.8.2 and I'm trying to
> porting my very old schema which I was using on my previous Solr 1.4
> installation.
> 
> On my old schema I removed some deprecated field types and the deprecated
> parameter "enablePositionIncrements" plus the "defaultSearchField" and the
> "solrQueryParser/@defaultOperator".
> 
> Now Solr is reporting that the _version_ field is missing:
> 
> =========================================================
> Error CREATEing SolrCore 'newcore': Unable to create core [newcore] Caused
> by: _version_ field must exist in schema and be searchable (indexed or
> docValues) and retrievable(stored or docValues) and not multiValued
> (_version_ not retrievable
> =========================================================
> 
> This happens even if I've already added the _version_ field into the schema:
> 
> =========================================================
> <field name="_version_" type="long" indexed="true" stored="false"/>
> =========================================================
> 
> Could you help me please?
> 
> Thank you very much!
> Bye


RE: Unable to create core: _version_ field must exist in schema and be searchable and retrievable and not multiValued

Posted by Gael Jourdan-Weil <ga...@kelkoogroup.com>.
Hi,

Did you try with _version_ field stored (stored=true)?

Gaël


De : shacky <sh...@gmail.com>
Envoyé : vendredi 23 avril 2021 12:09
À : solr-user <so...@lucene.apache.org>
Objet : Unable to create core: _version_ field must exist in schema and be searchable and retrievable and not multiValued 
 
Hi,
I'm creating a new core on a newly installed Solr 8.8.2 and I'm trying to
porting my very old schema which I was using on my previous Solr 1.4
installation.

On my old schema I removed some deprecated field types and the deprecated
parameter "enablePositionIncrements" plus the "defaultSearchField" and the
"solrQueryParser/@defaultOperator".

Now Solr is reporting that the _version_ field is missing:

=========================================================
Error CREATEing SolrCore 'newcore': Unable to create core [newcore] Caused
by: _version_ field must exist in schema and be searchable (indexed or
docValues) and retrievable(stored or docValues) and not multiValued
(_version_ not retrievable
=========================================================

This happens even if I've already added the _version_ field into the schema:

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

Could you help me please?

Thank you very much!
Bye

Re: Unable to create core: _version_ field must exist in schema and be searchable and retrievable and not multiValued

Posted by Alessandro Benedetti <a....@sease.io>.
If you focus on this part of the exception message, you should find your
answer:
... and retrievable(stored or docValues)...
(_version_ not retrievable

You need the _version_ field to be stored or docValues.

Cheers
--------------------------
Alessandro Benedetti
Apache Lucene/Solr Committer
Director, R&D Software Engineer, Search Consultant

www.sease.io


On Fri, 23 Apr 2021 at 11:10, shacky <sh...@gmail.com> wrote:

> Hi,
> I'm creating a new core on a newly installed Solr 8.8.2 and I'm trying to
> porting my very old schema which I was using on my previous Solr 1.4
> installation.
>
> On my old schema I removed some deprecated field types and the deprecated
> parameter "enablePositionIncrements" plus the "defaultSearchField" and the
> "solrQueryParser/@defaultOperator".
>
> Now Solr is reporting that the _version_ field is missing:
>
> =========================================================
> Error CREATEing SolrCore 'newcore': Unable to create core [newcore] Caused
> by: _version_ field must exist in schema and be searchable (indexed or
> docValues) and retrievable(stored or docValues) and not multiValued
> (_version_ not retrievable
> =========================================================
>
> This happens even if I've already added the _version_ field into the
> schema:
>
> =========================================================
> <field name="_version_" type="long" indexed="true" stored="false"/>
> =========================================================
>
> Could you help me please?
>
> Thank you very much!
> Bye
>