Re: _version_ field missing in schema?
Finally, since you are trying to really tweak the schema and general configuration right from the start, you may find some of my presentations useful, as they show the minimal configuration. Not perfect for your needs, as I do skip _version, but as an additional data point. The recent one is: https://www.slideshare.net/arafalov/rapid-solr-schema-development-phone-directory and the Git repo is at: https://github.com/arafalov/solr-presentation-2018-may . This one may be useful as well: https://www.slideshare.net/arafalov/from-content-to-search-speeddating-apache-solr-apachecon-2018-116330553 Thanks for the pointers. I've finally managed to get my schema to work ☺ Cheers, Aleks Regards, Alex. On Wed, Jan 23, 2019, 5:50 AM Aleksandar Dimitrov < a.dimit...@seidemann-web.com wrote: Hi Alex, thanks for you answer. I took the lines directly from the managed-schema, deleted the managed-schema, and pasted those lines into my schema.xml. If I have other errors in the schema.xml (such as a missing field type), solr complains about those until I fix them. So I would guess that the schema is at least *read*, but unsure if it is in fact used. I've not used solr before. I cannot use the admin UI, at least not while the core with the faulty schema is used. I wanted to use schema.xml because it allows for version control, and because it's easier for me to just use xml to define my schema. Is there a preferred approach? I don't (want to) use solr cloud, as for our use case a single instance of solr is more than enough. Thanks for your help, Aleks Alexandre Rafalovitch writes: > What do you mean schema.xml from managed-schema? schema.xml > is > old > non-managed approach. If you have both, schema.xml will be > ignored. > > I suspect you are not running with the schema you think you > do. > You can > check that with API or in Admin UI if you get that far. > > Regards, > Alex > > On Tue, Jan 22, 2019, 11:39 AM Aleksandar Dimitrov < > a.dimit...@seidemann-web.com wrote: > >> Hi, >> >> I'm using solr 7.5, in my schema.xml I have this, which I >> took >> from the >> managed-schema: >> >> >> >> > stored="false" /> >> > docValues="true" /> >> >> However, on startup, solr complains: >> >> Caused by: org.apache.solr.common.SolrException: _version_ >> field >> must exist in schema and be searchable (indexed or >> docValues) >> and >> retrievable(stored or docValues) and not multiValued >> (_version_ >> does not exist) >> at >> >> org.apache.solr.update.VersionInfo.getAndCheckVersionField(VersionInfo.java:69) >> >> ~[solr-core-7.5.0.jar:7.5.0 >> b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - >> 2018-09-18 13:07:55] >> at >> org.apache.solr.update.VersionInfo.(VersionInfo.java:95) >> ~[solr-core-7.5.0.jar:7.5.0 >> b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - >> 2018-09-18 13:07:55] >> at >> org.apache.solr.update.UpdateLog.init(UpdateLog.java:404) >> ~[solr-core-7.5.0.jar:7.5.0 >> b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - >> 2018-09-18 13:07:55] >> at >> org.apache.solr.update.UpdateHandler.(UpdateHandler.java:161) >> ~[solr-core-7.5.0.jar:7.5.0 >> b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - >> 2018-09-18 13:07:55] >> at >> org.apache.solr.update.UpdateHandler.(UpdateHandler.java:116) >> ~[solr-core-7.5.0.jar:7.5.0 >> b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - >> 2018-09-18 13:07:55] >> at >> >> org.apache.solr.update.DirectUpdateHandler2.(DirectUpdateHandler2.java:119) >> >> ~[solr-core-7.5.0.jar:7.5.0 >> b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - >> 2018-09-18 13:07:55] >> at >> >> jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native >> Method) ~[?:?] >> at >> >> jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) >> >> ~[?:?] >> at >> >> jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) >> >> ~[?:?] >> at >> java.lang.reflect.Constructor.newInstance(Constructor.java:488) >> ~[?:?] >> at >> org.apache.solr.core.SolrCore.createInstance(SolrCore.java:799) >> ~[solr-core-7.5.0.jar:7.5.0 >> b5bf70b7e32d7ddd9742cc821
Re: _version_ field missing in schema?
Shawn Heisey writes: On 1/23/2019 3:49 AM, Aleksandar Dimitrov wrote: Hi Alex, thanks for you answer. I took the lines directly from the managed-schema, deleted the managed-schema, and pasted those lines into my schema.xml. Unless you have changed the solrconfig.xml to refer to the classic schema, the file named schema.xml is not used. Yup, that was the mistake. I had to use in my solrconfig, and then it worked. I think the classic schema factory should be enough for our use case. Thanks! Aleks With the standard schema factory, on core startup, if schema.xml is found, it is copied to managed-schema and then renamed to a backup filename. This would also happen on reload, I believe. Recommendation: unless you're using the classic schema, never use the schema.xml file. Only work with managed-schema. Thanks, Shawn
Re: _version_ field missing in schema?
Hi Alex, thanks for you answer. I took the lines directly from the managed-schema, deleted the managed-schema, and pasted those lines into my schema.xml. If I have other errors in the schema.xml (such as a missing field type), solr complains about those until I fix them. So I would guess that the schema is at least *read*, but unsure if it is in fact used. I've not used solr before. I cannot use the admin UI, at least not while the core with the faulty schema is used. I wanted to use schema.xml because it allows for version control, and because it's easier for me to just use xml to define my schema. Is there a preferred approach? I don't (want to) use solr cloud, as for our use case a single instance of solr is more than enough. Thanks for your help, Aleks Alexandre Rafalovitch writes: What do you mean schema.xml from managed-schema? schema.xml is old non-managed approach. If you have both, schema.xml will be ignored. I suspect you are not running with the schema you think you do. You can check that with API or in Admin UI if you get that far. Regards, Alex On Tue, Jan 22, 2019, 11:39 AM Aleksandar Dimitrov < a.dimit...@seidemann-web.com wrote: Hi, I'm using solr 7.5, in my schema.xml I have this, which I took from the managed-schema: However, on startup, solr complains: Caused by: org.apache.solr.common.SolrException: _version_ field must exist in schema and be searchable (indexed or docValues) and retrievable(stored or docValues) and not multiValued (_version_ does not exist) at org.apache.solr.update.VersionInfo.getAndCheckVersionField(VersionInfo.java:69) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.VersionInfo.(VersionInfo.java:95) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.UpdateLog.init(UpdateLog.java:404) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.UpdateHandler.(UpdateHandler.java:161) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.UpdateHandler.(UpdateHandler.java:116) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.DirectUpdateHandler2.(DirectUpdateHandler2.java:119) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:488) ~[?:?] at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:799) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.createUpdateHandler(SolrCore.java:861) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.initUpdateHandler(SolrCore.java:1114) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.(SolrCore.java:984) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.(SolrCore.java:869) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1138) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] ... 7 more Anyone know what I'm doing wrong? I've tried having the _version_ field be string, and indexed and stored, but that didn't help. Thanks! Aleks
_version_ field missing in schema?
Hi, I'm using solr 7.5, in my schema.xml I have this, which I took from the managed-schema: stored="false" /> docValues="true" /> However, on startup, solr complains: Caused by: org.apache.solr.common.SolrException: _version_ field must exist in schema and be searchable (indexed or docValues) and retrievable(stored or docValues) and not multiValued (_version_ does not exist) at org.apache.solr.update.VersionInfo.getAndCheckVersionField(VersionInfo.java:69) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.VersionInfo.(VersionInfo.java:95) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.UpdateLog.init(UpdateLog.java:404) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.UpdateHandler.(UpdateHandler.java:161) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.UpdateHandler.(UpdateHandler.java:116) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.update.DirectUpdateHandler2.(DirectUpdateHandler2.java:119) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:488) ~[?:?] at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:799) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.createUpdateHandler(SolrCore.java:861) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.initUpdateHandler(SolrCore.java:1114) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.(SolrCore.java:984) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.SolrCore.(SolrCore.java:869) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1138) ~[solr-core-7.5.0.jar:7.5.0 b5bf70b7e32d7ddd9742cc821d471c5fabd4e3df - jimczi - 2018-09-18 13:07:55] ... 7 more Anyone know what I'm doing wrong? I've tried having the _version_ field be string, and indexed and stored, but that didn't help. Thanks! Aleks