Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solr search: Server and index default config #29

Closed
2 of 3 tasks
finnlewis opened this issue Jun 29, 2022 · 6 comments
Closed
2 of 3 tasks

Solr search: Server and index default config #29

finnlewis opened this issue Jun 29, 2022 · 6 comments
Assignees

Comments

@finnlewis
Copy link
Member

finnlewis commented Jun 29, 2022

From @ekes:

If we can reuse the index switching the server backend this will be helpful. It's probably essential for directories, news and later events. Switching indexes means duplicating views. This could be an option for search, but there would have to be a good case for doing so, it's probably really not an option for the others, though if someone has an idea how it'd work (and be maintainable) we could review.

Search, Directories, News ... modules all have a default db server config to roll out of the box working. It would be good to move these into separate modules. Then add the _solr equivalent. There is the configuration for the Search version in this module.

  • Try to separate db server config into a separate module
  • Add a new module for the solr server config
  • test / check that we can switch the view / index to a different server.
@ekes
Copy link
Member

ekes commented Jul 5, 2022

Just wondering do we think it's good enough that if the search index has no server attached to it that the module (_db or _solr) can inject its processor and third_party_settings in?

Or should we build a 'reset index' configuration page?

Explanation to question:

What I've done so far is removed from the index search_api.index.localgov_sitewide_search the server (it was the default db), and removed the specific processor settings from it (which were for the db).
This mean that localgov_search module can be installed without a backend server. A server can then be assigned to the index.
When localgov_search_db or localgov_search_solr are enabled if there is no server on that index they can enable it with theirs. But there are also the example/starter settings for processors.

These are all modules so there's no way of passing parameters to them, or asking questions when they get installed. Or not easy ways in any case. I am making the assumption that people will try out the _db and then want to try out the _solr modules, so there probably needs to be a way to change the configuration. Building some 'reset' index configuration page would be one option - more work; or just adding to the README that to swap the configuration you have to detach the index by removing the server, and then assuming it's ok to wipe whatever processor configuration if the index has no server when the submodule is enabled.

ekes added a commit that referenced this issue Jul 5, 2022
Processors and any other settings should still be added either
automatically with the install hook change, or with some UI.
Question #29 (comment)
@ekes
Copy link
Member

ekes commented Jul 5, 2022

A marginally tweaked solr config for lando/quick-start roll-out in https://github.com/localgovdrupal/localgov_project/tree/feature/2.x/localgov_search-29

@ekes
Copy link
Member

ekes commented Jul 6, 2022

I'm thinking maybe make it with hook_requirements so that you don't have _db and _solr enabled at the same time; when you uninstall one it removes itself from the index. When you install one of them and there is no server attached it adds its properties.

@finnlewis
Copy link
Member Author

finnlewis commented Jul 6, 2022

Sounds reasonable @ekes

It would be good if someone enabled one of the servers along with the index if it all wired together without further configuration, but maybe that's not super important.

Just tried the localgov_project branch and https://github.com/localgovdrupal/localgov_search/tree/feature/1.x/29-db-solr

When I try to enable the LocalGov Search Solr module I get a fail with:

Unable to install LocalGov Search Solr, search_api_solr.solr_field_type.text_en_6_0_0, search_api_solr.solr_field_type.text_en_7_0_0, search_api_solr.solr_field_type.text_phonetic_en_7_0_0 already exist in active configuration.

Edit: looks like the config is in
search_api_solr/config/optional and
localgov_search/modules/localgov_search_solr/config/install

@ekes
Copy link
Member

ekes commented Jul 6, 2022

When I try to enable the LocalGov Search Solr module I get a fail with:

There's a good reason it's a draft :-P I've already fixed that here while writing the tests which of course threw that up as an issue.

finnlewis added a commit that referenced this issue Jul 25, 2022
Issue #29: Just splitting db server into another module
@ekes
Copy link
Member

ekes commented Jan 30, 2023

We have now a seperate solr module.

@ekes ekes closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants