Solr Exception: Sort param field can't be found - solr

I've been trying to set up CKAN, however I am facing some problems in SOLR.
Everytime I run CKAN, the SOLR log file registers a new event, and that is:
org.apache.solr.common.SolrException: sort param field can't be found: metadata_modified
I am trying to use CKAN for the first time and I have no experience at all, so I have no idea what that log event means, nor how to fix it.
EDIT:
When I reload the core at SOLR, the following is logged:
The schema has been upgraded to managed,​ but the non-managed schema schema.xml is still loadable. PLEASE REMOVE THIS FILE.
Could anyone help me?
Many thanks.

Well, turns out the SOLR 6, for some reason, was the problem.
Downgrading to version 5 worked for me.

This sounds like you are not using CKAN's custom Solr schema. Make sure to go over all points in the setup documentation, specially point 2, and to restart jetty afterwards:
sudo service restart jetty

Related

Hybris Solr Indexing failing

I have been indexing for quite a long time but now I am not able to do so. I keep on getting the following error.
INFO [Thread-80] (00002SB6) [SolrIndexerJob] Started indexer cronjob.
ERROR [Thread-80] (00002SB6) [Job] Caught throwable de/hybris/platform/solrfacetsearch/config/IndexConfig
java.lang.NoClassDefFoundError: de/hybris/platform/solrfacetsearch/config/IndexConfig
at ma.glasnost.orika.generated.Orika_FacetSearchConfig_FacetSearchConfig_Mapper45623933135018$4.mapAtoB(Orika_FacetSearchConfig_FacetSearchConfig_Mapper45623
933135018$4.java)
at ma.glasnost.orika.impl.mapping.strategy.UseCustomMapperStrategy.map(UseCustomMapperStrategy.java:67)
at ma.glasnost.orika.impl.MapperFacadeImpl.map(MapperFacadeImpl.java:735)
at ma.glasnost.orika.impl.MapperFacadeImpl.map(MapperFacadeImpl.java:714)
at ma.glasnost.orika.impl.ConfigurableMapper.map(ConfigurableMapper.java:150)
at de.hybris.platform.solrfacetsearch.config.impl.DefaultFacetSearchConfigService.getConfiguration(DefaultFacetSearchConfigService.java:51)
at de.hybris.platform.solrfacetsearch.indexer.cron.AbstractIndexerJob.getFacetSearchConfig(AbstractIndexerJob.java:70)
at de.hybris.platform.solrfacetsearch.indexer.cron.SolrIndexerJob.performIndexingJob(SolrIndexerJob.java:49)
at de.hybris.platform.multicountry.solr.indexer.cron.impl.MulticountrySolrIndexerJob.performIndexingJob(MulticountrySolrIndexerJob.java:73)
at de.hybris.platform.solrfacetsearch.indexer.cron.AbstractIndexerJob.perform(AbstractIndexerJob.java:40)
at de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob.performCronJob(ServicelayerJob.java:38)
at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1390)
at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:814)
at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:732)
at de.hybris.platform.cronjob.jalo.Job.perform(Job.java:644)
at de.hybris.platform.servicelayer.cronjob.impl.DefaultCronJobService.performCronJob(DefaultCronJobService.java:86)
at de.hybris.platform.solrfacetsearchbackoffice.wizards.BaseSolrIndexerWizardStep$WizardCronJobAsyncOperation.execute(BaseSolrIndexerWizardStep.java:158)
at com.hybris.cockpitng.engine.impl.DefaultWidgetInstanceManager$1.getResult(DefaultWidgetInstanceManager.java:206)
at com.hybris.cockpitng.engine.operations.ResultLongOperation.execute(ResultLongOperation.java:52)
at com.hybris.cockpitng.engine.operations.LongOperation.run(LongOperation.java:205)
at java.lang.Thread.run(Thread.java:748)
Not sure which change is causing this issue.
Tried to setup new fresh hybris suite still the same issue. Followed hybris answers which mentioned to perform ant clean all and server startup, didn't work. Created new index and then performed indexing still the same. I am able to open solr admin but not able to index anything.
Any help would be really appreciated.
Just restarted the server. It worked for me!

Solr 6.1.0 loses cores after restart

I installed a new solr instance for testing. I used this documentation: Take solr to production
It's working fine but on restart I'm losing all cores. They are not deleted but on start solr does not find them.
Any idea what is wrong?
.
You are most likely restarting Solr with a wrong solr home, as discussed in the document you linked to.
You can check the core location in the Admin UI's Overview screen for that core. Your home is above that location, where solr.xml file lives. Or you can look for the solr.solr.home variable in the Java Properties screen.
check
/opt/solr/server/solr/solr.xml
or
/var/solr/data/solr.xml
update coreRootDirectory
<solr>
<str name="coreRootDirectory">/path/to/solr/data/</str>
<solrcloud>
I solved this by restarting the service

Whats the proper way to create a cor in solr 4.10.4

Solr 4.10.4 wont allow me to create a core.
When I try creating a core I get the following error
Error CREATEing SolrCore 'blog': Unable to create core [blog] Caused by:
Can't find resource 'solrconfig.xml' in classpath or
'/Users/ra/desktop/solrx/solr-4.10.4/example/solr/blog/conf
I'm using the admin to do this. I also tried
bin/solr create -c blog
and it still doesnt work how do you create a core in solr 4.10.4
I figured it out. the tutorial I am reading says to place blog in
example/
when it's supposed to be in
example/solr/
tht made it work hope it helps someone

Controlling what cores get loaded when solr 5 starts/restarts

I setup my solr instance to run the way I wanted. The service was restarted and all my setup was removed and 4 gettingstarted cores were loaded.
Can someone explain why this happened and what I can do to prevent it from happening again. I would like the cores that I built to be persistent.
Thanks for your help
Edit: Looking over :
https://cwiki.apache.org/confluence/display/solr/Moving+to+the+New+solr.xml+Format
I have the solr.xml setup exactly like the example. I have the core.properties files setup properly. I don't see how it is suppose to know to load the core I created.
Edit2: I found this documentation that states any core.properties files in the home folder will be used.
https://cwiki.apache.org/confluence/display/solr/Solr+Cores+and+solr.xml
Assuming Solr 5, it sounds like you run /bin/solr restart and got wrong collections. The reason to that would be that the restart command needs the same parameters as the start command, most importantly your solr home path.
Solr home is what you provided with -s parameter when you started your Solr the last time. If you did it instead by starting from an example, this guide on solr home locations should help.

Disappearing cores in Solr

I am new to Solr.
I have created two cores from the admin page, let's call them "books" and "libraries", and imported some data there. Everything works without a hitch until I restart the server. When I do so, one of these cores disappears, and the logging screen in the admin page contains:
SEVERE CoreContainer null:java.lang.NoClassDefFoundError: net/arnx/jsonic/JSONException
SEVERE SolrCore REFCOUNT ERROR: unreferenced org.apache.solr.core.SolrCore#454055ac (papers) has a reference count of 1
I was testing my query in the admin interface; when I refreshed it, the "libraries" core was gone, even though I could normally query it just a minute earlier. The contents of solr.xml are intact. Even if I restart Tomcat, it remains gone.
Additionally, I was trying to build a query similar to this: "Find books matching 'war peace' in libraries in Atlanta or New York". So given cores "books" and "libraries", I would issue "books" the following query (which might be wrong, if it is please correct me):
(title:(war peace) blurb:(war peace))
AND _query_:"{!join
fromIndex=libraries from=libraryid to=libraryid
v='city:(new york) city:(atlanta)'}"
When I do so, the query fails with "libraries" core disappears, with the above symptoms. If I re-add it, I can continue working (as long as I don't restart the server or issue another join query).
I am using Solr 4.0; if anyone has a clue what is happening, I would be very grateful. I could not find out anything about the meaning of the error message, so if anyone could suggest where to look for that, or how go about debugging this, it would be really great. I can't even find where the log file itself is located...
I would avoid the Debian package which may be misconfigured and quirky. And it contains (a very early build of?) solr 4.0, which itself may have lingering issues; being the first release in a new major version. The package maintainer may not have incorporated the latest and safest Solr release into his package.
A better way is to download Solr 4.1 yourself and set it up yourself with Tomcat or another servlet container.
In case you are looking to install SOLR 4.0 and configure, you can following the installation procedure from here
Update the solr config for the cores to be persistent.
In your solr.xml, update <solr> or <solr persistent="false"> to <solr persistent="true">

Resources