Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Apache Solr Search Integration uses the "drupal-*" naming convention whereas Search API Solr uses the "search-api-*" naming conventions. The goal here is to consolidate the solrconfig.xml files to something standard, however we have to be open to the fact that each project will make it's own customizations. Should we just allow each module to keep their current nomenclature, or should we try to find something common that shows which version of the standard config is being used?
Comments
Comment #1
Nick_vhthe drupal-* seems the more generic solution here, but I would happily settle for anything else. As long as the name reflects the version of solr it is ok.
Comment #2
drunken monkeyWe can switch to "drupal-*", no problem. Even less so if we manage a completely unified solrconfig.xml file.
Otherwise, we could do things like "drupal-1.2-apachesolr-1.1" to distinguish the base unified file from our customizations. "drupal-1.2" would be the generic file on which the config is based, "apachesolr-1.1" would mean that this is the second modification of that base file by the apachesolr module.
Comment #3
Nick_vhAgreed. Would we add the solr version 1.4.x / 3.x in the name to make it super clear and eventueel even have a check in the module to see if the schema is correct?
Comment #4
Nick_vhWhat if we make the name configurable in solrcore.properties?
Comment #5
drunken monkeyI don't think that would make much sense. Making the version of the file configurable by whoever uses it is contrary to the purpose of having a version.
Adding the Solr version is definitely a good idea, though.
Sooo …
solr-3.x-drupal-1.2[-apachesolr-1.1]
(the part in brackets only if the common file was modified in apachesolr)?Or does this look too much like "1.2" is the Drupal version? But I guess leaving "drupal" out would make it harder to spot whether you're using the right configs.
Comment #6
Nick_vhwe can have two variables
This would remove all confusions and address all flexibility issues. the name = base schema, version = module specific things. In the best case, we do not have module specific cases anymore.
This is what we are pursuing, so my opinion is that we do not even allow a search specific module. The schema/configs are flexible enough to allow this for both.
Comment #7
cpliakas CreditAttribution: cpliakas commentedI really like the approach in #1606122-6: Come up with a strategy for the name attribute for the config element. It reduces confusion, and it is very human readable as to which Drupal, Solr and modules the config is intended to work for.
Comment #8
Nick_vhComment #9
cpliakas CreditAttribution: cpliakas commentedI think if Thomas is cool, then we are ready to RTBC this.
Comment #10
drunken monkeyFrom the default
schema.xml
:So, it doesn't seem like we can (or should) do that. Might even lead to an exception at startup and complete shutdown.
Also,
solrconfig.xml
doesn't even have aversion
attribute, so we couldn't use that approach for both, anyways.Having the Drupal version in there is a good idea, in any case. So
solr-3.x-drupal7-1.2[-apachesolr-1.1]
maybe?Comment #11
Nick_vhFixed after discussion in drupalcon, see
in the repo
Comment #12
Nick_vhin IRC we settled for
since drupal-1, drupal-2 and drupal-3 are already in use. 4.0 makes sense to show this is the next big change.
There was some discussion about the lucenematchversion and wether or not this should be in the naming convention - we can always come back to that if required.
Comment #13
Nick_vhcommitted this new name