Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to map a search handler to solr root path while migrating from solr 4.4.0 to 5.x.x

Tags:

solr

lucene

With the old solr 4.4.0 versions running with the default setup it was possible to query the default collection with both:

/solr/collection1/select?q=*%3A*
/solr/select?q=*%3A* 

With solr 5.x.x the default root path

/solr/select?q=*%3A*

Now returns 404.

The only difference in the new solr.xml are these additional two lines:

 <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int>
 <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int>

The solrconfig.xml and core.properties files are also pretty much identical.

Is it possible to configure solr 5.x.x somehow to also map the search handlers to the root path?

like image 270
samy Avatar asked Dec 09 '25 07:12

samy


1 Answers

To get this back to work, you would need a default core and as such I fear the answer is: Will not work anymore with Solr 5.X. There are some discussions ([1], [2]) and issues in Solr's Jira about this topic. It is not by accident that this feature does not work any more. Apparently the developers did not like that feature.

The main issue for Solr 5.X is SOLR-4818 Refactorings to simplify loading, organization, sharing of cores, etc. One of its sub-tasks has the speaking name SOLR-5104 Remove Default Core which is related to SOLR-4804 remove support for "defaultCore" and "DEFAULT_DEFAULT_CORE_NAME" in solr 5.x.

For Solr 4.X there has been a patch with Solr 4.4 that re-included the old behaviour SOLR-4803 fix support for DEFAULT_DEFAULT_CORE_NAME.

But finally, if you are using the new solr.xml format, you loose the feature of a default core. As with Solr 5.0 the legacy format is not supported anymore, as you can read in the change log of Solr 5

  1. The 'old-style' solr.xml format is no longer supported, and cores must be defined using core.properties files. See https://cwiki.apache.org/confluence/display/solr/Format+of+solr.xml

And aparently, as they did not like to have requests without the core's name in the request URL, there is no other feature or configuration ability to get this back.

like image 118
cheffe Avatar answered Dec 11 '25 15:12

cheffe