Closed joachim-n closed 2 weeks ago
Decided today in meeting:
We're going to drop the idea that Solr provides a default server.
There will be only one module that provides a default server -- the DB module.
Other Finder server modules -- solr, elastic, etc -- can provide a server, but it will need to be configured manually.
@ekes and I discussed how to handle search API backends in finders, with the requirements that:
The Directories module handles this by saving a search index with a NULL value for its backend (which is technically broken -- you couldn't save that in the UI!). There are then 2 modules, one a submodule and one a separate project, which provide a DB backend and a Solr backend respectively. Each of these modules sets its backend into the index in a hook_install().
This works smoothly because there is only one index, and its name is known. In Finders, with multiple indexes, we don't have that simplicity!
We came up with the idea of adding more to the node type form: a way of saying either 'Yes, give me a sane default backend' or 'No, I'll set a backend myself after I've saved this form'. The initial idea was that this form alteration would be done by both the DB and the Solr modules.
However, I think we can simplify this a bit more:
localgov_finders_default_backend = TRUE
.localgov_finders_default_backend
set, it's used as the backend.We assume that if you've enabled a module that provides a Finder backend, it's because you want that setting on your indexes by default. You can always edit the index later anyway and change the backend.