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.
I've created a feature out of a view that uses apachesolr_views type that I created which has a differently named solr server on our production site. When I import the feature, the view it reports missing handlers.
How does one transport apachesolr views to another site?
thanks.
Comments
Comment #1
MiroslavBanov CreditAttribution: MiroslavBanov commentedI guess the Solr env_id is part of the machine name of the 'base table'. As long as the env_id is the same, it's OK to point to a different apachesolr server on both your Test and Production installations. The other important part is the documents that are sent to Solr. If none of the documents contain the Apachesolr field which you use as views filter/field/sort, then the handler will be broken, because the views filter/field/sort won't exist.
Comment #2
neubreed CreditAttribution: neubreed as a volunteer commentedHi
Thanks for getting back to me...
The fields are identical on both servers so that shouldn't be an issue.
So the only way to export a view is via a views export and replace the base table references to the new server's base table?
In my export I have
replace all instances of apachesolr__solr in the views export with apachesolr__other_server
Is that correct?
Could this eventually be done in features?
Comment #3
MiroslavBanov CreditAttribution: MiroslavBanov commentedLike I said, if your env_id happens to be the same, it will work. And, for the record, I don't like how it is implemented.
If you could explain your use case, this can help in implementing a better solution. Before the support of multiple environments was introduced in #1408500: Views of non-default Apache Solr "environments" (patch), the apachesolr_views always used the "default" env_id. Would that work better in your case?
Comment #4
MiroslavBanov CreditAttribution: MiroslavBanov commentedI have re-opened #1408500: Views of non-default Apache Solr "environments" (patch), and I believe it is related with the problem you are experiencing.
Can you please test if patch #9 is helping your situation at all?
Comment #5
MiroslavBanov CreditAttribution: MiroslavBanov commentedThis may be duplicate of #1408500: Views of non-default Apache Solr "environments" (patch) comment #9, but still need confirmation if that is true.
Comment #6
MiroslavBanov CreditAttribution: MiroslavBanov commentedDuplicate of #1408500: Views of non-default Apache Solr "environments" (patch)