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

MiroslavBanov’s picture

I 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.

neubreed’s picture

Hi

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

$view->base_table = 'apachesolr__solr';

replace all instances of apachesolr__solr in the views export with apachesolr__other_server

Is that correct?

Could this eventually be done in features?

MiroslavBanov’s picture

Like 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?

MiroslavBanov’s picture

I 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?

MiroslavBanov’s picture

Status: Active » Postponed (maintainer needs more info)

This may be duplicate of #1408500: Views of non-default Apache Solr "environments" (patch) comment #9, but still need confirmation if that is true.

MiroslavBanov’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)