lando / pantheon

The Official Lando Pantheon plugin.
https://docs.lando.dev/pantheon
GNU General Public License v3.0
11 stars 18 forks source link

Add ability to use "Pantheon Search Connector" (Solr 8) for Pantheon recipe #88

Closed Dishvola closed 2 years ago

Dishvola commented 2 years ago

So you use "Pantheon Search Connector" on production.

Image 2021-12-10 at 1 37 17 PM

Then you spin up it locally via lando.

It looks like you should update your .lando file with something like this:

# Get nice url's for each service.
proxy:
  search:
    - solr.yoursite.lndo.site:8983

services:
  # Solr
  # Spin up a Solr container called "search".
  search:
    # Use a specific Solr version, same as the default one at the time of writing.
    type: solr:8.6
    # Optionally declare the name of the Solr core.
    # This setting is only applicable for versions 5.5 and above.
    core: lando
    # Optionally allow access at localhost:9999.
    # You will need to make sure port 9999 is open on your machine.
    # You can also set `portforward: true` to have Lando dynamically assign a port.
    # Unlike specifying an actual port setting this to true will give you
    # a different port every time you restart your app.
    portforward: 8983
    # Optionally use custom Solr config files eg (schema.xml and solrconfig.xml).
    # This is relative to the app root (which may be different from your webroot).
    # This should be the directory containing the schema.xml and solrconfig.xml files, not the path to a certain file.
    config:
      conf: web/modules/contrib/search_api_solr/solr-conf-templates/8.x

BUT IT'S NOT WORKS FOR NOW.

In my opinion we should add default env variables to the lando such as:

PANTHEON_INDEX_SCHEME
PANTHEON_INDEX_HOST
PANTHEON_INDEX_PORT
PANTHEON_INDEX_PATH
PANTHEON_INDEX_CORE
PANTHEON_INDEX_SCHEMA

The values should be the same as default lando solr 8 parameters, so you just enable solr 8 in your .lando file, then run lando rebuild and it should works as expected with "Pantheon Search Connector" locally.

Please provide that somehow :) Or please correct me if I am wrong somewhere. Thanks!

Dishvola commented 2 years ago

Hm.... Looks like it should works by default when you just enable solr index index: true for pantheon receipt (for example):

name: sitename
recipe: pantheon
config:
  framework: drupal8
  site: sitename
  id: xxxxxxxxxxxxxxxxxxxxxxxxxxx
  webroot: web
  xdebug: true
  index: true
  edge: false
  cache: true

Lando should parse pantheon.yml, find out

search:
  version: 8

and then do the magic :)

I'm confusing and don't understand if it's a bug or feature request...

dustinleblanc commented 2 years ago

This is a feature request, Pantheon added new functionality and we just need to catch up

Dishvola commented 2 years ago

This is a feature request, Pantheon added new functionality and we just need to catch up

@dustinleblanc thank you! Will wait...

pbphuong commented 2 years ago

@Dishvola what does that mean for us? will we be able to have facet search?

labboy0276 commented 2 years ago

Closing this as a ticket already exists for this in #15