项目作者: KalleVuorjoki

项目描述 :
Local DDEV development environment for stabilizing Elasticsearch connector for Drupal drupal.org/project/elasticsearch_connector
高级语言: PHP
项目地址: git://github.com/KalleVuorjoki/drupal-elasticsearch.git
创建时间: 2021-03-09T06:54:21Z
项目社区:https://github.com/KalleVuorjoki/drupal-elasticsearch

开源协议:

下载


Installation

For local development use DDEV

Requirements on local machine:

  1. ddev composer install
  2. ddev start

Now you should have Elasticsearch and Drupal ready to start.

Quick-start

Import site, Search API and Elasticsearch configurations by running Drush command:

  1. ddev drush @es site-install --existing-config --account-pass=123 -y

Then login at https://drupal-elasticsearch.ddev.site with username admin and password 123

Elasticsearch

Make sure the Elasticsearch service is up and running by curl http://drupal-elasticsearch.ddev.site:9200

  1. curl http://drupal-elasticsearch.ddev.site:9200/elasticsearch_index_db_elasticsearch/_search\?pretty

Tools to help development
docker run -p 3030:3030 -d appbaseio/mirage
docker run -p 1358:1358 -d appbaseio/dejavu

or use Kibana
http://drupal-elasticsearch.ddev.site:5601/app/dev_tools#/console

Generate demo content

Demo content can be created with command:
ddev drush en demo_content -y

Run PHPUnit tests

ddev exec phpunit -c web/core web/modules/contrib/elasticsearch_connector

Run a single test with sqlite.
ddev . -- php web/core/scripts/run-tests.sh --verbose --sqlite /tmp/test.sqlite --dburl sqlite://localhost//tmp/test.sqlite --class "'Drupal\Tests\elasticsearch_connector\Unit\ElasticSearch\Parameters\Factory\MappingFactoryTest'"

SOLR

Install site with Solr.

  1. ddev drush @solr site-install --existing-config --account-pass=123 -y --sites-subdir=solr

Adding Solr server on Drupal Search API UI is not currently working.
http://drupal-elasticsearch-solr.ddev.site/admin/config/search/search-api/add-server will throw an fatal error.