From b5073d8560c1e4f72c45722a3309926765c9e394 Mon Sep 17 00:00:00 2001 From: julitafalcondusza Date: Fri, 16 Jun 2023 09:50:05 +0200 Subject: [PATCH 1/7] Search engine page reorganized --- docs/search/search_engines.md | 58 -- .../elastic_search_configuration.md | 501 ++++++++++++++++++ .../elastic_search_installation.md | 92 ++++ .../elastic_search/elastic_search_overview.md | 22 + .../legacy_seach_overview.md | 17 + .../legacy_search_configuration.md | 0 docs/search/search_engines/search_engines.md | 29 + .../solr_search_engine/solr_configuration.md | 244 +++++++++ .../solr_search_engine/solr_installation.md | 294 ++++++++++ .../solr_search_engine/solr_overview.md | 13 + 10 files changed, 1212 insertions(+), 58 deletions(-) delete mode 100644 docs/search/search_engines.md create mode 100644 docs/search/search_engines/elastic_search/elastic_search_configuration.md create mode 100644 docs/search/search_engines/elastic_search/elastic_search_installation.md create mode 100644 docs/search/search_engines/elastic_search/elastic_search_overview.md create mode 100644 docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md create mode 100644 docs/search/search_engines/legacy_search_engine/legacy_search_configuration.md create mode 100644 docs/search/search_engines/search_engines.md create mode 100644 docs/search/search_engines/solr_search_engine/solr_configuration.md create mode 100644 docs/search/search_engines/solr_search_engine/solr_installation.md create mode 100644 docs/search/search_engines/solr_search_engine/solr_overview.md diff --git a/docs/search/search_engines.md b/docs/search/search_engines.md deleted file mode 100644 index 59532a263f..0000000000 --- a/docs/search/search_engines.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -description: Ibexa DXP enables you to use Solr or Elasticsearch search engines, in addition to the built-in legacy search engine which has limited functionalities. ---- - -# Search engines - -Currently, the following search engines exist in their own [[= product_name =]] Bundles: - -1. [Legacy search engine](#legacy-search-engine), a database-powered search engine for basic needs. -1. [Solr](solr_search_engine.md), an integration providing better overall performance, much better scalability and support for more advanced search capabilities. -1. [Elasticsearch](elasticsearch_search_engine.md), available for [[= product_name_exp =]] customers, a document-oriented engine providing even better performance and scalability. - -## Legacy search engine - -Legacy search engine is the default search engine, it is SQL-based and uses Doctrine's database connection. -Its connections are defined in the same way as for storage engine, and no further specific configuration is needed. - -!!! tip - - The features and performance of Legacy search engine are limited. - If you have specific search or performance needs you should look towards using [Solr](solr_search_engine.md) - or [Elasticsearch](elasticsearch_search_engine.md). - - Using the Legacy search engine disables most shop features, such as product search. - -### Configuring Repository with Legacy search engine - -Search can be configured independently from storage, and the following configuration example shows both the default values, and how you configure legacy as the search engine: - -``` yaml -ibexa: - repositories: - main: - storage: - engine: legacy - connection: default - search: - engine: legacy - connection: default -``` - -## Search engine comparison - -| Feature | Elasticsearch | Apache Solr | Legacy Search Engine (SQL) | -| --- | --- | --- | --- | -| Filtering | Yes | Yes | Yes, limited\* | -| Query (filter with scoring) | Yes | Yes | Only filters, no scoring | -| Fulltext search | Yes, limited | Yes | Yes, limited\*\* | -| Index-time boosting | \*\*\* | No | No | -| Aggregations | Yes | Yes | No | - - -\* Usage of Criteria and Sort Clauses for Fields does not perform well on medium to larger -amount of data with Legacy Search Engine (SQL), use Solr for this. - -\*\* For more information about fulltext search syntax support, see [Fulltext Criterion](fulltext_criterion.md). - -\*\*\* Elasticsearch offers query-time boosting instead. diff --git a/docs/search/search_engines/elastic_search/elastic_search_configuration.md b/docs/search/search_engines/elastic_search/elastic_search_configuration.md new file mode 100644 index 0000000000..f538dcad98 --- /dev/null +++ b/docs/search/search_engines/elastic_search/elastic_search_configuration.md @@ -0,0 +1,501 @@ +--- +description: Configure Elasticsearch to use with Ibexa DXP. +--- + +# Elasticsearch configuration + +## Connections + +To configure Elasticsearch, first, you need to configure the connections. + +There are two possibilities of connection: +- through a [cluster of Elasticsearch nodes](#cluster) +- through the [Elasticsearch Cloud](#elasticsearch-cloud) + +No matter which option you choose, you have to define the connection settings under the `connections` key. +Set a name of the connection: + +``` yaml +ibexa_elasticsearch: + connections: + : +``` + +!!! tip "A default connection" + + If you define more than one connection, for example, to create a separate connection for + each repository, you must select the one that [[= product_name =]] should use with the following setting: + + ``` yaml + ibexa_elasticsearch: + # ... + default_connection: + ``` + +Now, you need to decide whether to add a cluster that you administer and manage yourself, or use a cloud +solution from Elastic, as well as configure additional parameters. + +If you want to connect using a cluster, follow the instructions below. +In case of using Elasticsearch Cloud, skip to [Elasticsearch Cloud](#elasticsearch-cloud) section. + + + +## Cluster + +A cluster consists of a number of nodes. +You might start with just one node and then add more nodes if you need more processing power. + +When you configure a node, you need to set the following parameters: + +- `host` - an IP address or domain name of the host. Default value: `localhost`. +- `port` - a port to connect to. Default value: `9200`. +If you have several Elasticsearch instances that run on the same host, and want to make them +distinct, you can change the default number. +- `scheme` - a protocol to be used to access the node. Default value: `http`. +- `path` - by default, path is not used. Default value: `null`. +If you have several Elasticsearch instances that run on the same host, and want to make them +distinct, you can define a path for each instance. +- `user`/`pass` - credentials, if needed to log in to the host. Default values: `null`. + +Next, list the addresses of cluster nodes under the `hosts` key: + +``` yaml +ibexa_elasticsearch: + connections: + : + hosts: + - '127.0.0.1:9200' + # ... +``` + +There are several ways that you can use to pass host parameters. +The easiest one is to pass them as a string: + +``` yaml +- https://:9200// +``` + +You can also pass the host configuration as an object that lists parameter-value pairs, +for example, when your authentication settings contain special characters. + +``` yaml +- { host: '', scheme: 'http', port: 9200, path: '/', user: , pass: } +``` + +Cluster connection configuration should have the following structure: + +``` yaml +ibexa_elasticsearch: + connections: + simple: + hosts: + - '127.0.0.1:9200' + - '127.0.0.1:9201' + - '127.0.0.1:9202' + + localhost: + debug: true + hosts: + - "127.0.0.1:9200" + - "b.elasticsearch.loc:9200" + - "c.elasticsearch.loc:9200" + + intranet: + debug: true + hosts: + - "c.elasticsearch.loc:9200" + + default_connection: simple +``` + +### Multi-node cluster behavior + +When you configure a cluster-based connection, and the cluster consists of many nodes, you can +choose strategies that govern how the cluster reacts to changing operating conditions, or how +workload is distributed among the nodes. + +#### Connection pool + +With this setting you decide how a list of hosts that form a cluster is managed. +The list of active hosts tends to change in time, due to different reasons, such as connectivity +issues, host malfunction, or the fact that you add new hosts to the cluster to increase +its performance. +By default, the `StaticNoPingConnectionPool` setting is used. + +You can change the default setting with the following key: + +``` yaml +: + # ... + connection_pool: Elasticsearch\ConnectionPool\ +``` + +For more information and a list of available choices, see [Connection pool](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/connection_pool.html). + +!!! tip "Load tests recommendation" + + If you change the connection pool setting, it is recommended that you to perform load tests + to check whether the change does not negatively impact the performance of your environment. + +#### Connection selector + +When the cluster consists of many hosts, the `connection_selector` setting decides what strategy +is used to pick a node to send query requests to. +By default, the `RoundRobinSelector` setting is used. + +If you prefer a different strategy, or have created your own, custom strategy, you can change the default setting with the following key: + +``` yaml +: + # ... + connection_selector: Elasticsearch\ConnectionPool\Selectors\ +``` + +For more information and a list of available choices, see [Selectors](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/selectors.html). + +##### Number of retries + +The `retries` setting configures the number of attempts that [[= product_name =]] makes to connect +to the nodes of the cluster before it throws an exception. +By default, `null` is used, which means that the number of retries equals to the number of nodes in the cluster. + +``` yaml +: + # ... + retries: null +``` + +Depending on the connection pool that you select, [[= product_name =]]'s reaction to reaching the maximum +number of retries might differ. + +For more information, see [Set retries](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/configuration.html#_set_retries). + +## Elasticsearch Cloud + +As an alternative to using your own cluster, you can use Elasticsearch Cloud, a commercial SaaS solution. +With Elasticsearch Cloud you do not have to build or manage your own Elasticsearch cluster. +Also, you do all the configuration and administration in a graphical user interface. + +To connect to a cloud solution with [[= product_name =]], you must set the `elastic_cloud_id` parameter by +providing an alphanumerical ID string that you obtain from the cloud's user interface, for example: + +``` yaml +: + elastic_cloud_id: 'production:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo5MjQzJGUwZ' +``` + +With the ID set, you must configure authentication to be able to access the remote environment. + +## Security + +Elasticsearch instances support `basic` and `api_key` authentication methods. +You select authentication type and configure the settings under the `authentication` key. By default, authentication is disabled: + +``` yaml +: + # ... + authentication: + type: null +``` + +If you connect to Elasticsearch hosts outside of your local network, you might also need to configure SSL encryption. + +### Basic authentication + +If your Elasticsearch server is protected by HTTP authentication, you must provide [[= product_name =]] with the credentials. +When using basic authentication, you must pass the following parameters: + +``` yaml + + # ... + authentication: + type: basic + credentials: [''] +``` + +For example: + +``` yaml +ibexa_elasticsearch: + connections: + cloud: + debug: true + elastic_cloud_id: 'test:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo5MjQzJGUwZ' + authentication: + type: basic + credentials: ['elastic', '1htFY83VvX2JRDw88MOkOejk'] +``` + +### API key authentication + +If your Elasticsearch cluster is protected by API keys, you must provide the key and secret in authentication configuration to +connect [[= product_name =]] with the cluster. With API key authentication you can define different +authorization levels, such as [`create_index`, `index`, etc.](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-privileges.html#privileges-list-indices). Such approach +proves useful if the cluster is available to the public. + +For more information, see [Create API key](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html). + +When using API key authentication, you must pass the following parameters to +authenticate access to the cluster: + +``` yaml +: + # ... + authentication: + type: api_key + credentials: ['', ''] +``` + +For example: + +``` yaml +ibexa_elasticsearch: + connections: + cloud: + debug: true + elastic_cloud_id: 'test:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo5MjQzJGUwZ' + authentication: + type: api_key + credentials: ['8Ek5f3IBGQlWj6v4M7zG', 'rmI6IechSnSJymWJ4LZqUw'] +``` + +### SSL + +When you need to protect your communication with the Elasticsearch server, you can use SSL encryption. +When configuring SSL for your internal infrastructure, you can use your own client certificates signed by a public CA. +Configure SSL by passing the path-passwords pairs for both the certificate and the certificate key. + +For example: + +``` yaml +ibexa_elasticsearch: + connections: + cloud_with_ssl: + debug: true + elastic_cloud_id: 'test:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo5MjQzJGUwZ' + authentication: + type: api_key + credentials: ['8Ek5f3IBGQlWj6v4M7zG', 'rmI6IechSnSJymWJ4LZqUw'] + ssl: + cert: + path: '/path/to/cert.pem' + pass: ~ + cert_key: + path: '/path/to/cert-key' + pass: ~ +``` + +If you do not have a client certificate signed by public certificate authority, +but you have a self-signed CA certificate generated by `elasticsearch-certutil` or another tool (for example for development purposes), +use the following `ssl` configuration: + +``` yaml +ibexa_elasticsearch: + connections: + cloud_with_ssl: + debug: true + elastic_cloud_id: 'test:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo5MjQzJGUwZ' + ssl: + ca_cert: + path: '/path/to/ca_cert.pem' +``` + +If you configure both `ca_cert` and `cert` entries, the `ca_cert` parameter takes precedence over the `cert` parameter. + +After you have configured SSL, you can still disable it, for example when the certificates +expire, or you are migrating to a new set of certificates. +To do this, pass the following setting under the `ssl` key: + +``` yaml +verification: false +``` + +For more information, see [Elasticsearch: SSL Encyption](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/security.html#_ssl_encryption_2). + +### Enabling debugging + +In a staging environment, you can log messages about the status of communication with Elasticsearch. +You can then use Symfony Profiler to review the logs. + +By default, debugging is disabled. To enable debugging, you can toggle either of the following two settings: + +``` yaml +: + # ... + debug: + trace: +``` + +- `debug` logs basic information about a request, such as request status and time. +- `trace` logs additional information, such as steps to reproduce an exact copy of a query. + +!!! tip + + Make sure that you disable debugging in a production environment. + +## Field Type mapping templates + +Before you can re-index the [[= product_name =]] data, so that Elasticsearch can search through its contents, you must define an index template. +Templates instruct Elasticsearch to recognize [[= product_name =]] Fields as specific data types, based on, for example, a field name. +They help you prevent Elasticsearch from using the dynamic field mapping feature to create type mappings automatically. +You can create several field type mapping templates for each index, for example, to define settings that are specific for different languages. +When you establish a relationship between a field mapping template and a connection, you can apply several templates, too. + +### Defining a template + +To define a field mapping template, you must provide a number of settings under the `index_templates` key. +The structure of the template is as follows: + +``` yaml +ibexa_elasticsearch: + # ... + index_templates: + : + patterns: + # ... + settings: + # ... + mappings: + # ... +``` + +Set a unique name for the template and configure the following keys: + +- `patterns` - A list of wildcards that Elasticsearch uses to match the field mapping template to an index. +Index names use the following pattern: + + `___` + + By default, repository name is set to `default`, however, in the context of an [[= product_name =]] instance, + there can be [several repositories with different names](repository_configuration.md#defining-custom-connection). + Document type can be either `content` or `location`. + In a language code, hyphens are replaced with underscores, and all characters must be lowercase. + An index name can therefore look like this: + + `default_content_eng_gb_2` + + You can use the `patterns` setting when your data contains content in different languages. + You can create index templates with settings that apply to a specific language only, + for example, to eliminate stop words from the index, or help divide concatenations. + You use patterns to identify index templates that contain settings specific for a given language: + + ``` yaml + ibexa_elasticsearch: + # ... + index_templates: + default_en_us: + patterns: ['default_*', '*eng_us*'] + # ... + ``` + +- `settings` - Settings under this key control all aspects related to an index. +For more information and a list of available settings, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/index-modules.html#index-modules-settings). + + For example, you can define settings that convert text into a format that is optimized for + search, like a normalizer that changes a case of all phrases in the index: + + ``` yaml + ibexa_elasticsearch: + # ... + index_templates: + default: + # ... + settings: + analysis: + normalizer: + lowercase_normalizer: + type: custom + char_filter: [] + filter: lowercase + # ... + ``` + +- `mappings` - Settings under this key define mapping for fields in the index. +For more information about mappings, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/mapping.html). + + When you create a custom index template, with settings for your own field and document + types, make sure that it contains mappings for all searchable fields that are available in [[= product_name =]]. + For an example of default configuration with a list of searchable fields. + To see the default configuration, go to `vendor/ibexa/elasticsearch/src/bundle/Resources/config/` and open the `default-config.yaml` file. + +### Fine-tuning the search results + +Your search results can be adjusted by configuring additional parameters. +For a list of available mapping parameters and their usage, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/mapping-params.html). + +For example, you can apply a mapping parameter, in this case, a normalizer, to a specific +mapping under the `dynamic_templates` key: + +``` yaml +ibexa_elasticsearch: + # ... + index_templates: + default: + # ... + mappings: + # ... + dynamic_templates: + - ez_string: + match: "*_s" + mapping: + type: keyword + normalizer: lowercase_normalizer + # ... +``` + +You can also set a boosting factor for a specific field. +Boosting increases the relevance of hits, for example making keywords from the title more relevant than the ones from other places of the document. +Set the boosting factor under the `properties` key: + +``` yaml +ibexa_elasticsearch: + # ... + index_templates: + default: + # ... + mappings: + properties: + content_name_s: + boost: 2.0 + # ... +``` + +You can even copy contents of existing fields, process them and then paste into another field, which than can be queried: + +``` yaml +ibexa_elasticsearch: + # ... + index_templates: + default: + # ... + mappings: + properties: + user_first_name_s: + type: keyword + normalizer: lowercase_normalizer + copy_to: custom_field + # ... +``` + +## Binding templates with connections + +Once you have created the field mapping template(s), you must establish a relationship between the templates and a connection. You do this by adding the "index_templates" key to a connection definition. + +If your configuration file contains several connection definitions, you can reuse the same template for different connections. +If you have several index templates, you can apply different combinations of templates to different connections. + +``` yaml +: + # ... + index_templates: + - default + - default_en_us +``` + +For more information about how Elasticsearch handles settings and mappings from multiple templates that match the same index, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates-v1.html#multiple-templates-v1). + +# Extending Elasticsearch + +To learn how you can create document field mappers, custom Search Criteria, +custom Sort Clauses and Aggregations, see [Search extensibility](create_custom_search_criterion.md). diff --git a/docs/search/search_engines/elastic_search/elastic_search_installation.md b/docs/search/search_engines/elastic_search/elastic_search_installation.md new file mode 100644 index 0000000000..0e2a18bbb9 --- /dev/null +++ b/docs/search/search_engines/elastic_search/elastic_search_installation.md @@ -0,0 +1,92 @@ +--- +description: Install Elasticsearch to use with Ibexa DXP. +--- + +# Elasticsearch installation + +## Step 1: Download and install Elasticsearch + +[Install Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/install-elasticsearch.html) on your server. +For example, use the following [Docker](https://docs.docker.com/get-started/overview/) command: + +``` +docker run -d --name ibexa-dxp-elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.16.2 +``` + +!!! note + + [[= product_name =]] supports Elasticsearch in version 7.16.2 or higher. + +## Step 2: Verify that the Elasticsearch instance is up + +To make sure that the Elasticsearch instance operates properly, access the instance (for example, with `curl http://localhost:9200/`). + +If Elasticsearch operates properly, an object with cluster details is displayed. +It should be similar to the following example: + +``` json +{ + "name" : "doej-MacPro-mTkBe", + "cluster_name" : "elasticsearch", + "cluster_uuid" : "WLYqnQ_lSZGbX-vDIe_vZQ", + "version" : { + "number" : "7.7.0", + "build_flavor" : "default", + "build_type" : "tar", + "build_hash" : "5b1fea5", + "build_date" : "2020-05-10T02:35:59.208Z", + "build_snapshot" : false, + "lucene_version" : "8.5.1", + "minimum_wire_compatibility_version" : "6.8.0", + "minimum_index_compatibility_version" : "6.0.0-beta1" + }, + "tagline" : "You Know, for Search" +} +``` + +## Step 3: Set the default search engine + +Set the following environment variable (for example, in the `.env` or `.env.local` file): + +``` yaml +SEARCH_ENGINE=elasticsearch +``` + +## Step 4: Configure the search engine + +[[= product_name =]] comes pre-configured to work with an Elasticsearch cluster that uses default settings, and you can use this initial setup for testing purposes. +However, to effectively search through actual data, you must provide specific settings. +All configuration is made in the `/config/packages/ibexa_elasticsearch.yaml` file. + +!!! note + + All the settings, their order and meaning, correspond to the settings that are described in + the Elasticsearch documentation. + +First, decide how [[= product_name =]] connects to Elasticsearch and configure other connection settings. +For more information, see [Configuring connections](#connections). + +Then, define a field type mappings template that instructs Elasticsearch to interpret [[= product_name =]] fields as specific types. For more information, see [Configuring field type mappings](#field-type-mapping-templates). + +## Step 5: Push the templates + +For each of your defined connections, push the templates to the Elasticsearch engine by running the following command: + +``` bash +php bin/console ibexa:elasticsearch:put-index-template +``` + +You can modify the behavior of the command with a number of switches. Use the `-h` switch to display a complete list of available options. + +## Step 6: Reindex the database + +After creating index templates, run the following command to reindex your data: + +``` bash +php bin/console ibexa:reindex +``` + +!!! caution "Risks of premature indexing" + + Do not reindex your data before you create index templates. + Otherwise Elasticsearch attempts to use its [dynamic field mapping](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/dynamic-field-mapping.html) feature to create type mappings automatically. \ No newline at end of file diff --git a/docs/search/search_engines/elastic_search/elastic_search_overview.md b/docs/search/search_engines/elastic_search/elastic_search_overview.md new file mode 100644 index 0000000000..20470a8520 --- /dev/null +++ b/docs/search/search_engines/elastic_search/elastic_search_overview.md @@ -0,0 +1,22 @@ +--- +description: Elasticsearch search engine overview. +--- + +# Elasticsearch search engine + +Elasticsearch is an open-source, distributed, Java-based search engine that responds to queries +in real-time and is easily scalable in reaction to changing processing needs. + +Elasticsearch enables you to use filtering, query, query-time boosting, fulltext search and aggregations. +It organizes data into documents, that then are grouped into indices. + +As a result of having distributed architecture, Elasticsearch can analyze massive amounts of data with almost real-time performance. +Instead of searching text directly, it searches and index. Thanks to this mechanism, it is able to achieve fast response. + +For a detailed description of advanced settings that you might require in a specific production environment, +see the documentation provided by Elastic. +Start with the [Set up Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/setup.html) section. + +**Prerequisite** + +To proceed you need to be familiar with how indexing, filtering and queries work. \ No newline at end of file diff --git a/docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md b/docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md new file mode 100644 index 0000000000..cebed73769 --- /dev/null +++ b/docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md @@ -0,0 +1,17 @@ +--- +description: Legacy search engine overview. +--- + +# Legacy search engine + +Legacy search engine is the default search engine, it is SQL-based and uses Doctrine's database connection. +Its connections are defined in the same way as for storage engine, and no further specific configuration is needed. +Legacy search engine is not intended in production. + +!!! tip + + The features and performance of Legacy search engine are limited. + If you have specific search or performance needs you should look towards using [Solr](solr_search_engine.md) + or [Elasticsearch](elasticsearch_search_engine.md). + + Using the Legacy search engine disables most shop features, such as product search. \ No newline at end of file diff --git a/docs/search/search_engines/legacy_search_engine/legacy_search_configuration.md b/docs/search/search_engines/legacy_search_engine/legacy_search_configuration.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/search/search_engines/search_engines.md b/docs/search/search_engines/search_engines.md new file mode 100644 index 0000000000..8c653b8d19 --- /dev/null +++ b/docs/search/search_engines/search_engines.md @@ -0,0 +1,29 @@ +--- +description: Ibexa DXP enables you to use Solr or Elasticsearch search engines, in addition to the built-in legacy search engine which has limited functionalities. +--- + +# Search engines + +[[= product_name =]] enables you to use search engines. +Currently, they exist in their own [[= product_name =]] Bundles: + +1. [Legacy search engine](#legacy-search-engine) - a database-powered search engine for basic needs. +1. [Solr](solr_search_engine.md) - an integration providing better overall performance, better scalability and support for more advanced search capabilities. +1. [Elasticsearch](elasticsearch_search_engine.md) - a document-oriented engine providing even better performance and scalability. + +## Search engine comparison + +| Feature | Legacy Search Engine (SQL) | Solr | Elasticsearch | +| --- | --- | --- | --- | +| Filtering | Yes, limited\* | Yes | Yes | +| Query (filter with scoring) | Only filters, no scoring | Yes | Yes | +| Fulltext search | Yes, limited\*\* | Yes | Yes, limited | +| Index-time boosting | No | No | Query-time boosting\*\*\* | +| Aggregations | No | Yes | Yes | + +\* Usage of Criteria and Sort Clauses for Fields does not perform well on medium to larger +amount of data with Legacy Search Engine (SQL). + +\*\* For more information about fulltext search syntax support, see [Fulltext Criterion](fulltext_criterion.md). + +\*\*\* Elasticsearch offers query-time boosting instead. \ No newline at end of file diff --git a/docs/search/search_engines/solr_search_engine/solr_configuration.md b/docs/search/search_engines/solr_search_engine/solr_configuration.md new file mode 100644 index 0000000000..e9b84c5839 --- /dev/null +++ b/docs/search/search_engines/solr_search_engine/solr_configuration.md @@ -0,0 +1,244 @@ +--- +description: Configure Solr search engine to use with Ibexa DXP. +--- + +# Solr configuration + +## Boost configuration + +!!! caution "Index time boosting" + + Index time boosting was deprecated in Solr 6.5 and removed in Solr 7.0. + Until query time boosting is implemented, there is no way to boost in the bundle out of the box. + +!!! tip "How boosting interacts with Search API" + + Boosting of fields or documents will affect the score (relevance) of your search result hits + when using Search API for any Criteria you specify on `$query->query`, or in REST by using `Query` element. + When you don't specify anything to sort on, the result will be sorted by this relevance. + Anything set on `$query->filter`, or in REST using `Filter` element, will *not* affect scoring and only works + as a pure filter for the result. Thus make sure to place Criteria you want to affect scoring on `query`. + +Boosting currently happens when indexing, so if you change your configuration you will need to re-index. + +Boosting tells the search engine which parts of the content model have more importance when searching, and is an important part of tuning your search results relevance. Importance is defined using a numeric value, where `1.0` is default, values higher than that are more important, and values lower (down to `0.0`) are less important. + +Boosting is configured per connection that you configure to use for a given Repository, like in this `config/packages/ibexa_solr.yaml` example: + +``` yaml +ibexa_solr: + connections: + default: + boost_factors: + content_type: + # Boost a whole Content Type + article: 2.0 + meta_field: + # Boost a meta Field (name, text) system wide, or for a given Content Type + name: 10.0 + article: + # Boost the meta full text Field for article more than 2.0 set above + text: 5.0 +``` + +The configuration above will result in the following boosting (Content Type / Field): + +- `article/title: 2.0` +- `news/description: 1.0` (default) +- `article/text (meta): 5.0` +- `blog_post/name (meta): 10.0` +- `article/name (meta): 2.0` + +!!! tip "How to configure boosting on specific fields" + + Currently, boosting on particular fields is missing. + However, it could be configured using 3rd party [Novactive/NovaeZSolrSearchExtraBundle](https://github.com/Novactive/NovaeZSolrSearchExtraBundle) in case of custom search implementation, e.g. to handle your front-end search form. + Unfortunately, this doesn't affect search performed in the administration interface. + + The following example presents boosting configuration for Folder's `name` and `description` fields. + First, in `ibexa_solr.yaml` configure [custom fulltext fields.](https://github.com/Novactive/NovaeZSolrSearchExtraBundle/blob/master/doc/custom_fields.md) + + ```yaml + ez_solr_search_extra: + system: + default: + fulltext_fields: + custom_folder_name: + - folder/name + custom_folder_description: + - folder/description + ``` + + The second step requires you to use `\Novactive\EzSolrSearchExtra\Query\Content\Criterion\MultipleFieldsFullText` instead of default `\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\FullText`. + The following example shows custom query which benefits from the custom fields created in the previous example. + + ```php + searchService = $searchService; + } + + public function searchAction(Request $request): Response + { + $queryString = $request->get('query'); + + $query = new Query(); + $query->query = new \Novactive\EzSolrSearchExtra\Query\Content\Criterion\MultipleFieldsFullText( + $queryString, + [ + 'metaBoost' => [ + 'custom_folder_name' => 20.0, + 'custom_folder_description' => 10.0, + ] + ] + ); + + $searchResult = $this->searchService->findContent($query); + + ... + } + } + ``` + + Remember to clear the cache and perform search engine reindex afterwords. + + The above configuration will result in the following boosting (Content Type / Field): + + - `folder/name: 20.0` + - `folder/description: 10.0` + +## Indexing related objects + +You can use indexation of related objects to search through text of related content. +Indexing is disabled by default. +To set it up you need to define the maximum indexing depth using the following YAML configuration: + +```yaml +ibexa_solr: + # ... + connections: + default: + # ... + indexing_depth: + # Default value: 0 - no relation indexing, 1 - direct relations, 2nd level relations, 3rd level relations (maximum value). + default: 1 + content_type: + # Index depth defined for specific content type + article: 2 +``` + +## Configuring Solr Replication (master/slave) + +!!! note + + The configuration below has been tested on Solr 7.7. + +### Configuring Master for replication + +First you need to change the core configuration in `solrconfig.xml` (for example `*/opt/solr/server/ibexa/collection1/conf/solrconfig.xml`). +You can copy and paste the code below before any other `requestHandler` section. + +```xml + + + optimize + optimize + schema.xml,stopwords.txt,elevate.xml + 00:00:10 + + 2 + + 16 + + +solrconfig_slave.xml:solrconfig.xml,x.xml,y.xml +``` + +Then restart the master with: + +```bash +sudo su - solr -c "/opt/solr/bin/solr restart" +``` + +### Configuring Slave for replication + +You have to edit the same file on the slave server, and use the code below: + +```xml + + + + + http://123.456.789.0:8983/solr/collection1/replication + + + 00:00:20 + + + + internal + + + 5000 + 10000 + + + username + password + + +``` + +Next, restart Solr slave. + +Connect to the Solr slave interface (http://localhost:8983/solr), go to your core and check the replication status: + +![Solr Slave](solr.png) + +# Configuring HTTP Client for Solr queries + +Ibexa Solr Bundle uses Symfony HTTP Client to fetch and update Solr index. +You can configure timeout and maximum number of retries for that client using Solr Bundle's Semantic configuration: + +```yaml +ibexa_solr: + # ... + http_client: + # ... + timeout: 30 + max_retries: 5 +``` + +# Extending Solr + +To learn how you can create document field mappers, custom Search Criteria, +custom Sort Clauses and Aggregations, see [Search extensibility](create_custom_search_criterion.md). diff --git a/docs/search/search_engines/solr_search_engine/solr_installation.md b/docs/search/search_engines/solr_search_engine/solr_installation.md new file mode 100644 index 0000000000..7c4b7e9d5d --- /dev/null +++ b/docs/search/search_engines/solr_search_engine/solr_installation.md @@ -0,0 +1,294 @@ +--- +description: Install Solr search engine to use with Ibexa DXP. +--- + +# Solr search engine installation + +## Step 1: Configure and start Solr + +The example presents a configuration with a single core. For configuring Solr in other ways, including examples, see [Solr Cores and `solr.xml`](https://cwiki.apache.org/confluence/display/solr/Solr+Cores+and+solr.xml) and [core administration](https://wiki.apache.org/solr/CoreAdmin). + +### Download and configure + +!!! note "Solr versions" + + Supported Solr versions are Solr 7 and 8. Using most recent version of Solr 7.7 or 8.11 is recommended. + +Download and extract Solr: + +- [solr-7.7.2.tgz](http://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.tgz) or [solr-7.7.2.zip](http://archive.apache.org/dist/lucene/solr/7.7.2/solr-7.7.2.zip) +- [solr-8.11.2.tgz](https://www.apache.org/dyn/closer.lua/lucene/solr/8.11.2/solr-8.11.2.tgz) or [solr-8.11.2.zip](https://www.apache.org/dyn/closer.lua/lucene/solr/8.11.2/solr-8.11.2.zip) + +Copy the necessary configuration files. In the example below from the root of your project to the place you extracted Solr: + +``` bash +# Make sure to replace the /opt/solr/ path with where you have placed Solr +cd /opt/solr +mkdir -p server/ibexa/template +cp -R /vendor/ibexa/solr/src/lib/Resources/config/solr/* server/ibexa/template +cp server/solr/configsets/_default/conf/{solrconfig.xml,stopwords.txt,synonyms.txt} server/ibexa/template +cp server/solr/solr.xml server/ibexa + +# If you are using Ibexa Commerce, additionally copy commerce-specific configuration files: +cat /vendor/ibexa/commerce-shop/src/bundle/Search/Resources/config/solr/custom-fields-types.xml >> server/ibexa/template/custom-fields-types.xml +cat /vendor/ibexa/commerce-shop/src/bundle/Search/Resources/config/solr/language-fieldtypes.xml >> server/ibexa/template/language-fieldtypes.xml + +# Modify solrconfig.xml to remove the section that doesn't agree with your schema +sed -i.bak '//d' server/ibexa/template/solrconfig.xml + +# Start Solr (but apply autocommit settings below first if you need to) +bin/solr -s ibexa +bin/solr create_core -c collection1 -d server/ibexa/template +``` + +#### SolrCloud + +SolrCloud is a cluster of Solr servers. It enables you to: + +- centralize configuration +- automatically load balance and fail-over for queries +- integrate ZooKeeper for cluster coordination and configuration + +To set SolrCloud up follow [SolrCloud reference guide.](https://lucene.apache.org/solr/guide/7_7/solrcloud.html) + +### Further configuration + +The bundle does not commit Solr index changes directly on Repository updates, leaving it up to you to tune this using `solrconfig.xml` as best practice suggests. + +This setting is **required** if you want to see the changes after publish. It is strongly recommended to set-up `solrconfig.xml` like this: + +``` xml + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + ${solr.autoSoftCommit.maxTime:20} + +``` + +### Generating configuration + +The command line tool `bin/generate-solr-config.sh` generates Solr 7 configuration automatically. +It can be used for deploying to Ibexa Cloud (Platform.sh) and on-premise installs. + +Execute the script from the [[= product_name =]] root directory for further information: + +``` bash +./vendor/ibexa/solr/bin/generate-solr-config.sh --help +``` + +## Step 2: Configure the bundle + +The Solr Search Engine Bundle can be configured in many ways. The config further below assumes you have parameters set up for Solr DSN and search engine *(however both are optional)*, for example: + +``` yaml + env(SEARCH_ENGINE): solr + env(SOLR_DSN): 'http://localhost:8983/solr' + env(SOLR_CORE): collection1 +``` + +### Single-core example (default) + +Out of the box in [[= product_name =]] the following is enabled for a simple setup: + +``` yaml +ibexa_solr: + endpoints: + endpoint0: + dsn: '%solr_dsn%' + core: '%solr_core%' + connections: + default: + entry_endpoints: + - endpoint0 + mapping: + default: endpoint0 +``` + +### Shared-core example + +The following example separates one language. The installation contains several similar languages, +and one very different language that should receive proper language analysis for proper stemming and sorting behavior by Solr: + +``` yaml +ibexa_solr: + endpoints: + endpoint0: + dsn: '%solr_dsn%' + core: core0 + endpoint1: + dsn: '%solr_dsn%' + core: core1 + connections: + default: + entry_endpoints: + - endpoint0 + - endpoint1 + mapping: + translations: + jpn-JP: endpoint1 + # Other languages, for instance eng-US and other western languages are sharing core + default: endpoint0 +``` + +### Multi-core example + +If full language analysis features are preferred, then each language can be configured with separate cores. + +!!! note + + Make sure to test this setup against a single-core setup, as it might perform worse than single-core if your project uses a lot of language fallbacks per SiteAccess, as queries will then be performed across several cores at once. + +``` yaml +ibexa_solr: + endpoints: + endpoint0: + dsn: '%solr_dsn%' + core: core0 + endpoint1: + dsn: '%solr_dsn%' + core: core1 + endpoint2: + dsn: '%solr_dsn%' + core: core2 + endpoint3: + dsn: '%solr_dsn%' + core: core3 + endpoint4: + dsn: '%solr_dsn%' + core: core4 + endpoint5: + dsn: '%solr_dsn%' + core: core5 + endpoint6: + dsn: '%solr_dsn%' + core: core6 + connections: + default: + entry_endpoints: + - endpoint0 + - endpoint1 + - endpoint2 + - endpoint3 + - endpoint4 + - endpoint5 + - endpoint6 + mapping: + translations: + jpn-JP: endpoint1 + eng-US: endpoint2 + fre-FR: endpoint3 + ger-DE: endpoint4 + esp-ES: endpoint5 + # Not really used, but specified here for fallback if more languages are suddenly added by content admins + default: endpoint0 + # Also use separate core for main languages (differs from content object to content object) + # This is useful to reduce number of cores queried for always available language fallbacks + main_translations: endpoint6 +``` + +### SolrCloud example + +To use SolrCloud you need to specify data distribution strategy for connection via the `distribution_strategy` option to [`cloud`.](https://lucene.apache.org/solr/guide/7_7/solrcloud.html) + +The example is based on multi-core setup so any specific language analysis options could be specified on the collection level. + +``` yaml +ibexa_solr: + endpoints: + main: + dsn: '%solr_dsn%' + core: '%solr_main_core%' + en: + dsn: '%solr_dsn%' + core: '%solr_en_core%' + fr: + dsn: '%solr_dsn%' + core: '%solr_fr_core%' + # ... + connections: + default: + distribution_strategy: cloud + entry_endpoints: + - main + - en + - fr + # - ... + mapping: + translations: + eng-GB: en + fre-FR: fr + # ... + main_translations: main +``` + +This solution uses the default SolrCloud [document routing strategy: `compositeId`.](https://lucene.apache.org/solr/guide/7_7/shards-and-indexing-data-in-solrcloud.html#ShardsandIndexingDatainSolrCloud-DocumentRouting) + +### Solr Basic HTTP Authorization +Solr core can be secured with Basic HTTP Authorization. See more information here: [Solr Basic Authentication Plugin.](https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin) +In the example below we configured Solr Bundle to work with secured Solr core. + +``` yaml +ibexa_solr: + endpoints: + endpoint0: + dsn: '%solr_dsn%' + core: core0 + user: example + pass: password +``` + +Obviously, you should pass credentials for every configured and HTTP Basic secured Solr core. Configuration for multi core setup is exactly the same. + +## Step 3: Configure repository with the specific search engine + +The following is an example of configuring Solr search engine, where `connection` name is same as in the example above, and engine is set to `solr`: + +``` yaml +ibexa: + repositories: + default: + storage: ~ + search: + engine: '%search_engine%' + connection: default +``` + +`%search_engine%` is a parameter that is configured in `config/packages/ibexa.yaml`, and should be changed from its default value `legacy` to `solr` to activate Solr as the search engine. + +## Step 4: Clear prod cache + +While Symfony `dev` environment keeps track of changes to YAML files, `prod` does not, so clear the cache to make sure Symfony reads the new config: + +``` bash +php bin/console --env=prod cache:clear +``` + +## Step 5: Run CLI indexing command + +The last step is to execute the initial indexation of data: + +``` bash +php bin/console --env=prod --siteaccess= ibexa:reindex +``` + +### Possible exceptions + +If you have not configured your setup correctly, some exceptions might happen on indexing. +Here are the most common issues you may encounter: + +- Exception if Binary files in database have an invalid path prefix + - Make sure `var_dir` is configured properly in `ibexa.yaml` configuration. + - If your database is inconsistent in regards to file paths, try to update entries to be correct *(make sure to make a backup first)*. +- Exception on unsupported Field Types + - Make sure to implement all Field Types in your installation, or to configure missing ones as [NullType](nullfield.md) if implementation is not needed. +- Content is not immediately available  + - Solr Bundle on purpose does not commit changes directly on Repository updates *(on indexing)*, but lets you control this using Solr configuration. Adjust Solr's `autoSoftCommit` (visibility of changes to search index) and/or `autoCommit` (hard commit, for durability and replication) to balance performance and load on your Solr instance against needs you have for "[NRT](https://cwiki.apache.org/confluence/display/solr/Near+Real+Time+Searching)". +- Running out of memory during indexing + - In general make sure to run indexing using the prod environment to avoid debuggers and loggers from filling up memory. + - Flysystem: You can find further info in https://jira.ez.no/browse/EZP-25325. \ No newline at end of file diff --git a/docs/search/search_engines/solr_search_engine/solr_overview.md b/docs/search/search_engines/solr_search_engine/solr_overview.md new file mode 100644 index 0000000000..42e8244d9a --- /dev/null +++ b/docs/search/search_engines/solr_search_engine/solr_overview.md @@ -0,0 +1,13 @@ +--- +description: Solr search engine overview. +--- + +# Solr search engine + +[Solr search engine](https://github.com/ibexa/solr) allows you to use advanced search features: filtering, query, fulltext search and aggregations. + +When you enable Solr and re-index your content, all your existing Search queries using `SearchService` will be powered by Solr automatically. +This allows you to scale up your [[= product_name =]] installation and be able to continue development locally against SQL engine, and have a test infrastructure, Staging and Prod powered by Solr. +By this, it also removes considerable load from your database. + +For further information on the architecture of Ibexa DXP, see [Architecture](architecture.md). \ No newline at end of file From 62bc77422858c6b477c6b310a6bd88622e089161 Mon Sep 17 00:00:00 2001 From: julitafalcondusza Date: Fri, 16 Jun 2023 13:39:10 +0200 Subject: [PATCH 2/7] Search engine page reorganized and revised --- docs/search/search.md | 6 ++--- .../elastic_search_configuration.md | 25 ++++++++----------- .../elastic_search_installation.md | 18 ++++++------- .../legacy_repository_configuration.md | 20 +++++++++++++++ .../legacy_seach_overview.md | 17 ------------- .../legacy_search_configuration.md | 0 .../legacy_search_overview.md | 19 ++++++++++++++ docs/search/search_engines/search_engines.md | 6 ++--- .../solr_search_engine/solr_installation.md | 15 +++++------ mkdocs.yml | 16 +++++++++--- 10 files changed, 86 insertions(+), 56 deletions(-) create mode 100644 docs/search/search_engines/legacy_search_engine/legacy_repository_configuration.md delete mode 100644 docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md delete mode 100644 docs/search/search_engines/legacy_search_engine/legacy_search_configuration.md create mode 100644 docs/search/search_engines/legacy_search_engine/legacy_search_overview.md diff --git a/docs/search/search.md b/docs/search/search.md index 3ac0ae91b0..3e00c313f8 100644 --- a/docs/search/search.md +++ b/docs/search/search.md @@ -8,9 +8,9 @@ page_type: landing_page [[= product_name =]] exposes a very powerful [Search API](search_api.md), allowing both full-text search and querying the content Repository using several built-in Search Criteria and Sort Clauses. These are supported across different search engines, allowing you to plug in another search engine without changing your code. [[= cards([ - "search/search_engines", - "search/elasticsearch_search_engine", - "search/solr_search_engine", + "search/search_engines/search_engines", + "search/search_engines/elastic_search/elastic_search_overview.md, + "search/solr_overview", "search/search_api", "search/search_criteria_and_sort_clauses", "search/extensibility/create_custom_search_criterion", diff --git a/docs/search/search_engines/elastic_search/elastic_search_configuration.md b/docs/search/search_engines/elastic_search/elastic_search_configuration.md index f538dcad98..417dc36c99 100644 --- a/docs/search/search_engines/elastic_search/elastic_search_configuration.md +++ b/docs/search/search_engines/elastic_search/elastic_search_configuration.md @@ -9,8 +9,8 @@ description: Configure Elasticsearch to use with Ibexa DXP. To configure Elasticsearch, first, you need to configure the connections. There are two possibilities of connection: -- through a [cluster of Elasticsearch nodes](#cluster) -- through the [Elasticsearch Cloud](#elasticsearch-cloud) +- using [cluster of Elasticsearch nodes](#cluster) +- using [Elasticsearch Cloud](#elasticsearch-cloud) No matter which option you choose, you have to define the connection settings under the `connections` key. Set a name of the connection: @@ -35,16 +35,13 @@ ibexa_elasticsearch: Now, you need to decide whether to add a cluster that you administer and manage yourself, or use a cloud solution from Elastic, as well as configure additional parameters. -If you want to connect using a cluster, follow the instructions below. -In case of using Elasticsearch Cloud, skip to [Elasticsearch Cloud](#elasticsearch-cloud) section. - - +If you want to connect by using a cluster, follow the instructions below in the [Cluster](#cluster) section. +If you want to use Elasticsearch Cloud, skip to [Elasticsearch Cloud](#elasticsearch-cloud) section. ## Cluster -A cluster consists of a number of nodes. -You might start with just one node and then add more nodes if you need more processing power. +A cluster consists of nodes. +You might start with one node and then add more nodes if you need more processing power. When you configure a node, you need to set the following parameters: @@ -52,7 +49,7 @@ When you configure a node, you need to set the following parameters: - `port` - a port to connect to. Default value: `9200`. If you have several Elasticsearch instances that run on the same host, and want to make them distinct, you can change the default number. -- `scheme` - a protocol to be used to access the node. Default value: `http`. +- `scheme` - a protocol used to access the node. Default value: `http`. - `path` - by default, path is not used. Default value: `null`. If you have several Elasticsearch instances that run on the same host, and want to make them distinct, you can define a path for each instance. @@ -178,7 +175,7 @@ With Elasticsearch Cloud you do not have to build or manage your own Elasticsear Also, you do all the configuration and administration in a graphical user interface. To connect to a cloud solution with [[= product_name =]], you must set the `elastic_cloud_id` parameter by -providing an alphanumerical ID string that you obtain from the cloud's user interface, for example: +providing an alphanumerical ID string that you get from the cloud's user interface, for example: ``` yaml : @@ -204,7 +201,7 @@ If you connect to Elasticsearch hosts outside of your local network, you might a ### Basic authentication If your Elasticsearch server is protected by HTTP authentication, you must provide [[= product_name =]] with the credentials. -When using basic authentication, you must pass the following parameters: +In the basic authentication, you must pass the following parameters: ``` yaml @@ -339,12 +336,12 @@ By default, debugging is disabled. To enable debugging, you can toggle either of Before you can re-index the [[= product_name =]] data, so that Elasticsearch can search through its contents, you must define an index template. Templates instruct Elasticsearch to recognize [[= product_name =]] Fields as specific data types, based on, for example, a field name. They help you prevent Elasticsearch from using the dynamic field mapping feature to create type mappings automatically. -You can create several field type mapping templates for each index, for example, to define settings that are specific for different languages. +You can create several Field Type mapping templates for each index, for example, to define settings that are specific for different languages. When you establish a relationship between a field mapping template and a connection, you can apply several templates, too. ### Defining a template -To define a field mapping template, you must provide a number of settings under the `index_templates` key. +To define a field mapping template, you must provide settings under the `index_templates` key. The structure of the template is as follows: ``` yaml diff --git a/docs/search/search_engines/elastic_search/elastic_search_installation.md b/docs/search/search_engines/elastic_search/elastic_search_installation.md index 0e2a18bbb9..7692f92520 100644 --- a/docs/search/search_engines/elastic_search/elastic_search_installation.md +++ b/docs/search/search_engines/elastic_search/elastic_search_installation.md @@ -4,12 +4,12 @@ description: Install Elasticsearch to use with Ibexa DXP. # Elasticsearch installation -## Step 1: Download and install Elasticsearch +## Download and install Elasticsearch [Install Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/install-elasticsearch.html) on your server. -For example, use the following [Docker](https://docs.docker.com/get-started/overview/) command: +As an example, use the following [Docker](https://docs.docker.com/get-started/overview/) command: -``` +```yml docker run -d --name ibexa-dxp-elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.16.2 ``` @@ -17,7 +17,7 @@ docker run -d --name ibexa-dxp-elasticsearch -p 9200:9200 -p 9300:9300 -e "disco [[= product_name =]] supports Elasticsearch in version 7.16.2 or higher. -## Step 2: Verify that the Elasticsearch instance is up +## Verify the instance To make sure that the Elasticsearch instance operates properly, access the instance (for example, with `curl http://localhost:9200/`). @@ -44,7 +44,7 @@ It should be similar to the following example: } ``` -## Step 3: Set the default search engine +## Set the default search engine Set the following environment variable (for example, in the `.env` or `.env.local` file): @@ -52,7 +52,7 @@ Set the following environment variable (for example, in the `.env` or `.env.loca SEARCH_ENGINE=elasticsearch ``` -## Step 4: Configure the search engine +## Configure the search engine [[= product_name =]] comes pre-configured to work with an Elasticsearch cluster that uses default settings, and you can use this initial setup for testing purposes. However, to effectively search through actual data, you must provide specific settings. @@ -66,9 +66,9 @@ All configuration is made in the `/config/packages/ibexa_elasticsearch.yaml` fil First, decide how [[= product_name =]] connects to Elasticsearch and configure other connection settings. For more information, see [Configuring connections](#connections). -Then, define a field type mappings template that instructs Elasticsearch to interpret [[= product_name =]] fields as specific types. For more information, see [Configuring field type mappings](#field-type-mapping-templates). +Then, define a Field Type mappings template that instructs Elasticsearch to interpret [[= product_name =]] fields as specific types. For more information, see [Configuring Field Type mappings](#field-type-mapping-templates). -## Step 5: Push the templates +## Push the templates For each of your defined connections, push the templates to the Elasticsearch engine by running the following command: @@ -78,7 +78,7 @@ php bin/console ibexa:elasticsearch:put-index-template You can modify the behavior of the command with a number of switches. Use the `-h` switch to display a complete list of available options. -## Step 6: Reindex the database +## Reindex the database After creating index templates, run the following command to reindex your data: diff --git a/docs/search/search_engines/legacy_search_engine/legacy_repository_configuration.md b/docs/search/search_engines/legacy_search_engine/legacy_repository_configuration.md new file mode 100644 index 0000000000..4975074b4f --- /dev/null +++ b/docs/search/search_engines/legacy_search_engine/legacy_repository_configuration.md @@ -0,0 +1,20 @@ +--- +description: Configure Legacy search engine to use with Ibexa DXP. +--- + +# Repository configuration with Legacy search engine + +Search can be configured independently from storage, and the following configuration example shows both the default values, +and how you configure legacy as the search engine: + +``` yaml +ibexa: + repositories: + main: + storage: + engine: legacy + connection: default + search: + engine: legacy + connection: default +``` diff --git a/docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md b/docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md deleted file mode 100644 index cebed73769..0000000000 --- a/docs/search/search_engines/legacy_search_engine/legacy_seach_overview.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -description: Legacy search engine overview. ---- - -# Legacy search engine - -Legacy search engine is the default search engine, it is SQL-based and uses Doctrine's database connection. -Its connections are defined in the same way as for storage engine, and no further specific configuration is needed. -Legacy search engine is not intended in production. - -!!! tip - - The features and performance of Legacy search engine are limited. - If you have specific search or performance needs you should look towards using [Solr](solr_search_engine.md) - or [Elasticsearch](elasticsearch_search_engine.md). - - Using the Legacy search engine disables most shop features, such as product search. \ No newline at end of file diff --git a/docs/search/search_engines/legacy_search_engine/legacy_search_configuration.md b/docs/search/search_engines/legacy_search_engine/legacy_search_configuration.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/search/search_engines/legacy_search_engine/legacy_search_overview.md b/docs/search/search_engines/legacy_search_engine/legacy_search_overview.md new file mode 100644 index 0000000000..6618c5b330 --- /dev/null +++ b/docs/search/search_engines/legacy_search_engine/legacy_search_overview.md @@ -0,0 +1,19 @@ +--- +description: Legacy search engine overview. +--- + +# Legacy search engine + +Legacy search engine is the default search engine. It is SQL-based and uses Doctrine's database connection. +The connections are defined in the same way as for storage engine, and no further specific configuration is needed. +Legacy search engine is recommended for basic needs and is not intended in production. +It allows you to use filtering and fulltext search, but with some limitations. +For more information, check [search engine comparison](search_engines/#search-engine-comparison) + +!!! tip + + The features and performance of Legacy search engine are limited. + If you have specific search or performance needs, it is recommended to use [Solr](solr_overview.md) + or [Elasticsearch](elastic_search_overview.md) instead. + + Using the Legacy search engine disables most shop features, such as product search. diff --git a/docs/search/search_engines/search_engines.md b/docs/search/search_engines/search_engines.md index 8c653b8d19..ff0069d366 100644 --- a/docs/search/search_engines/search_engines.md +++ b/docs/search/search_engines/search_engines.md @@ -7,9 +7,9 @@ description: Ibexa DXP enables you to use Solr or Elasticsearch search engines, [[= product_name =]] enables you to use search engines. Currently, they exist in their own [[= product_name =]] Bundles: -1. [Legacy search engine](#legacy-search-engine) - a database-powered search engine for basic needs. -1. [Solr](solr_search_engine.md) - an integration providing better overall performance, better scalability and support for more advanced search capabilities. -1. [Elasticsearch](elasticsearch_search_engine.md) - a document-oriented engine providing even better performance and scalability. +1. [Legacy search engine](legacy_search_overview.md) - a database-powered search engine for basic needs. +1. [Solr](solr_overview.md) - an integration providing better overall performance, better scalability and support for more advanced search capabilities. +1. [Elasticsearch](elastic_search_overview.md) - a document-oriented engine providing even better performance and scalability. ## Search engine comparison diff --git a/docs/search/search_engines/solr_search_engine/solr_installation.md b/docs/search/search_engines/solr_search_engine/solr_installation.md index 7c4b7e9d5d..2e5ed54539 100644 --- a/docs/search/search_engines/solr_search_engine/solr_installation.md +++ b/docs/search/search_engines/solr_search_engine/solr_installation.md @@ -4,9 +4,10 @@ description: Install Solr search engine to use with Ibexa DXP. # Solr search engine installation -## Step 1: Configure and start Solr +## Configure and start Solr -The example presents a configuration with a single core. For configuring Solr in other ways, including examples, see [Solr Cores and `solr.xml`](https://cwiki.apache.org/confluence/display/solr/Solr+Cores+and+solr.xml) and [core administration](https://wiki.apache.org/solr/CoreAdmin). +The example presents a configuration with a single core. +For configuring Solr in other ways, including examples, see [Solr Cores and `solr.xml`](https://cwiki.apache.org/confluence/display/solr/Solr+Cores+and+solr.xml) and [core administration](https://wiki.apache.org/solr/CoreAdmin). ### Download and configure @@ -41,7 +42,7 @@ bin/solr -s ibexa bin/solr create_core -c collection1 -d server/ibexa/template ``` -#### SolrCloud +#### Set up SolrCloud SolrCloud is a cluster of Solr servers. It enables you to: @@ -82,7 +83,7 @@ Execute the script from the [[= product_name =]] root directory for further info ./vendor/ibexa/solr/bin/generate-solr-config.sh --help ``` -## Step 2: Configure the bundle +## Configure the bundle The Solr Search Engine Bundle can be configured in many ways. The config further below assumes you have parameters set up for Solr DSN and search engine *(however both are optional)*, for example: @@ -245,7 +246,7 @@ ibexa_solr: Obviously, you should pass credentials for every configured and HTTP Basic secured Solr core. Configuration for multi core setup is exactly the same. -## Step 3: Configure repository with the specific search engine +## Configure repository with the specific search engine The following is an example of configuring Solr search engine, where `connection` name is same as in the example above, and engine is set to `solr`: @@ -261,7 +262,7 @@ ibexa: `%search_engine%` is a parameter that is configured in `config/packages/ibexa.yaml`, and should be changed from its default value `legacy` to `solr` to activate Solr as the search engine. -## Step 4: Clear prod cache +## Clear prod cache While Symfony `dev` environment keeps track of changes to YAML files, `prod` does not, so clear the cache to make sure Symfony reads the new config: @@ -269,7 +270,7 @@ While Symfony `dev` environment keeps track of changes to YAML files, `prod` doe php bin/console --env=prod cache:clear ``` -## Step 5: Run CLI indexing command +## Run CLI indexing command The last step is to execute the initial indexation of data: diff --git a/mkdocs.yml b/mkdocs.yml index c470e40673..6a54ff0474 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -399,9 +399,19 @@ nav: - CDP activation: cdp/cdp_activation.md - Search: - Search: search/search.md - - Search engines: search/search_engines.md - - Elasticsearch search engine: search/elasticsearch_search_engine.md - - Solr search engine: search/solr_search_engine.md + - Search engines: + - Search engines: search/search_engines/search_engines.md + - Elasticsearch search engine: + - Overview: search/search_engines/elastic_search/elastic_search_overview.md + - Installation: search/search_engines/elastic_search/elastic_search_installation.md + - Configuration: search/search_engines/elastic_search/elastic_search_configuration.md + - Solr search engine: + - Overview: search/search_engines/solr_search_engine/solr_overview.md + - Installation: search/search_engines/solr_search_engine/solr_installation.md + - Configuration: search/search_engines/solr_search_engine/solr_configuration.md + - Legacy search engine: + - Overview: search/search_engines/legacy_search_engine/legacy_search_overview.md + - Repository configuration: search/search_engines/legacy_search_engine/legacy_repository_configuration.md - Search Criteria and Sort Clauses: search/search_criteria_and_sort_clauses.md - Search API: search/search_api.md - Search Criteria reference: From b2e3a9fa22185afe7547256e5dc86b5516e13321 Mon Sep 17 00:00:00 2001 From: julitafalcondusza Date: Fri, 16 Jun 2023 14:25:01 +0200 Subject: [PATCH 3/7] Fixes in 'Search' page --- docs/search/search.md | 4 ++-- docs/search/search_engines/search_engines.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/search/search.md b/docs/search/search.md index 3e00c313f8..c0162d2ca2 100644 --- a/docs/search/search.md +++ b/docs/search/search.md @@ -9,8 +9,8 @@ page_type: landing_page [[= cards([ "search/search_engines/search_engines", - "search/search_engines/elastic_search/elastic_search_overview.md, - "search/solr_overview", + "search/search_engines/elastic_search/elastic_search_overview", + "search/search_engines/solr_search_engine/solr_overview", "search/search_api", "search/search_criteria_and_sort_clauses", "search/extensibility/create_custom_search_criterion", diff --git a/docs/search/search_engines/search_engines.md b/docs/search/search_engines/search_engines.md index ff0069d366..c33fa3ea9a 100644 --- a/docs/search/search_engines/search_engines.md +++ b/docs/search/search_engines/search_engines.md @@ -11,7 +11,7 @@ Currently, they exist in their own [[= product_name =]] Bundles: 1. [Solr](solr_overview.md) - an integration providing better overall performance, better scalability and support for more advanced search capabilities. 1. [Elasticsearch](elastic_search_overview.md) - a document-oriented engine providing even better performance and scalability. -## Search engine comparison +## Search engines comparison | Feature | Legacy Search Engine (SQL) | Solr | Elasticsearch | | --- | --- | --- | --- | From 518c46d144cb9f8d40c4e965eef2a0067be1379e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C4=85browski?= <64841871+dabrt@users.noreply.github.com> Date: Tue, 20 Jun 2023 10:12:51 +0200 Subject: [PATCH 4/7] Proposed changes to structure --- ...ch_reference.md => url_search_criteria.md} | 19 +- .../url_search_sort_clauses.md | 17 + mkdocs.yml | 362 +++++++++--------- 3 files changed, 203 insertions(+), 195 deletions(-) rename docs/search/url_search_reference/{url_search_reference.md => url_search_criteria.md} (67%) create mode 100644 docs/search/url_search_reference/url_search_sort_clauses.md diff --git a/docs/search/url_search_reference/url_search_reference.md b/docs/search/url_search_reference/url_search_criteria.md similarity index 67% rename from docs/search/url_search_reference/url_search_reference.md rename to docs/search/url_search_reference/url_search_criteria.md index 7b5a85d8f6..769b74c0c9 100644 --- a/docs/search/url_search_reference/url_search_reference.md +++ b/docs/search/url_search_reference/url_search_criteria.md @@ -3,9 +3,9 @@ description: URL Search Criteria help define and fine-tune search queries for UR page_type: reference --- -# URL search reference +# URL Search Criteria reference -## URL criteria reference +URL Search Criteria are part of Search Criteria and they are supported only by URL Search. |URL criteria|URL based on| |------------|------------| @@ -18,17 +18,4 @@ page_type: reference |[SectionId](sectionid_url_criterion.md)|Matches URLs from content placed in the Section with the specified ID.| |[SectionIdentifier](sectionidentifier_url_criterion.md)|Matches URLs from content placed in Sections with the specified identifiers.| |[Validity](validity_url_criterion.md)|Matches URLs based on validity flag.| -|[VisibleOnly](visibleonly_url_criterion.md)|Matches URLs from published content.| - -## URL Sort Clauses reference - -Sort Clauses are the sorting options for URLs. - -All Sort Clauses can take the following optional argument: - -- `sortDirection` - the direction of the sorting, either `\Ibexa\Contracts\Core\Repository\Values\URL\Query\SortClause::SORT_ASC` (default) or `\Ibexa\Contracts\Core\Repository\Values\URL\Query\SortClause::SORT_DESC` - -| Sort Clause | Sorting based on | -|-----|-----| -|[Id](id_url_sort_clause.md)|URL ID| -|[URL](url_url_sort_clause.md)|URL address| +|[VisibleOnly](visibleonly_url_criterion.md)|Matches URLs from published content.| \ No newline at end of file diff --git a/docs/search/url_search_reference/url_search_sort_clauses.md b/docs/search/url_search_reference/url_search_sort_clauses.md new file mode 100644 index 0000000000..c2e4fec50d --- /dev/null +++ b/docs/search/url_search_reference/url_search_sort_clauses.md @@ -0,0 +1,17 @@ +--- +description: URL Sort Clauses +page_type: reference +--- + +# URL Sort Clauses + +URL Sort Clauses are the sorting options for URLs. + +All URL Sort Clauses can take the following optional argument: + +- `sortDirection` - the direction of the sorting, either `\Ibexa\Contracts\Core\Repository\Values\URL\Query\SortClause::SORT_ASC` (default) or `\Ibexa\Contracts\Core\Repository\Values\URL\Query\SortClause::SORT_DESC` + +| Sort Clause | Sorting based on | +|-----|-----| +|[Id](id_url_sort_clause.md)|URL ID| +|[URL](url_url_sort_clause.md)|URL address| diff --git a/mkdocs.yml b/mkdocs.yml index 6a54ff0474..6a888fbd1b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -412,173 +412,192 @@ nav: - Legacy search engine: - Overview: search/search_engines/legacy_search_engine/legacy_search_overview.md - Repository configuration: search/search_engines/legacy_search_engine/legacy_repository_configuration.md + - Reindex search: search/search_reindexing.md - Search Criteria and Sort Clauses: search/search_criteria_and_sort_clauses.md - - Search API: search/search_api.md - Search Criteria reference: - - Search Criteria reference: search/criteria_reference/search_criteria_reference.md - - Ancestor: search/criteria_reference/ancestor_criterion.md - - ContentId: search/criteria_reference/contentid_criterion.md - - ContentTypeGroupId: search/criteria_reference/contenttypegroupid_criterion.md - - ContentTypeId: search/criteria_reference/contenttypeid_criterion.md - - ContentTypeIdentifier: search/criteria_reference/contenttypeidentifier_criterion.md - - CurrencyCode: search/criteria_reference/currencycode_criterion.md - - CustomerGroupId: search/criteria_reference/customergroupid_criterion.md - - DateMetadata: search/criteria_reference/datemetadata_criterion.md - - Depth: search/criteria_reference/depth_criterion.md - - Field: search/criteria_reference/field_criterion.md - - FieldRelation: search/criteria_reference/fieldrelation_criterion.md - - FullText: search/criteria_reference/fulltext_criterion.md - - IsCurrencyEnabled: search/criteria_reference/iscurrencyenabled_criterion.md - - IsFieldEmpty: search/criteria_reference/isfieldempty_criterion.md - - IsMainLocation: search/criteria_reference/ismainlocation_criterion.md - - IsProductBased: search/criteria_reference/isproductbased_criterion.md - - IsUserBased: search/criteria_reference/isuserbased_criterion.md - - IsUserEnabled: search/criteria_reference/isuserenabled_criterion.md - - LanguageCode: search/criteria_reference/languagecode_criterion.md - - LocationId: search/criteria_reference/locationid_criterion.md - - LocationRemoteId: search/criteria_reference/locationremoteid_criterion.md - - MapLocationDistance: search/criteria_reference/maplocationdistance_criterion.md - - MatchAll: search/criteria_reference/matchall_criterion.md - - MatchNone: search/criteria_reference/matchnone_criterion.md - - ObjectStateId: search/criteria_reference/objectstateid_criterion.md - - ObjectStateIdentifier: search/criteria_reference/objectstateidentifier_criterion.md - - ParentLocationId: search/criteria_reference/parentlocationid_criterion.md - - Priority: search/criteria_reference/priority_criterion.md - - RemoteId: search/criteria_reference/remoteid_criterion.md - - SectionId: search/criteria_reference/sectionid_criterion.md - - SectionIdentifier: search/criteria_reference/sectionidentifier_criterion.md - - Sibling: search/criteria_reference/sibling_criterion.md - - Subtree: search/criteria_reference/subtree_criterion.md - - TaxonomyEntryID: search/criteria_reference/taxonomy_entry_id.md - - UserEmail: search/criteria_reference/useremail_criterion.md - - UserId: search/criteria_reference/userid_criterion.md - - UserLogin: search/criteria_reference/userlogin_criterion.md - - UserMetadata: search/criteria_reference/usermetadata_criterion.md - - Visibility: search/criteria_reference/visibility_criterion.md - - LogicalAnd Criterion: search/criteria_reference/logicaland_criterion.md - - LogicalNot Criterion: search/criteria_reference/logicalnot_criterion.md - - LogicalOr Criterion: search/criteria_reference/logicalor_criterion.md - - Product Search Criteria: - - Product Search Criteria: search/criteria_reference/product_search_criteria.md - - BasePrice: search/criteria_reference/baseprice_criterion.md - - CheckboxAttribute: search/criteria_reference/checkboxattribute_criterion.md - - ColorAttribute: search/criteria_reference/colorattribute_criterion.md - - CreatedAt: search/criteria_reference/createdat_criterion.md - - CreatedAtRange: search/criteria_reference/createdatrange_criterion.md - - CustomPrice: search/criteria_reference/customprice_criterion.md - - FloatAttribute: search/criteria_reference/floatattribute_criterion.md - - IntegerAttribute: search/criteria_reference/integerattribute_criterion.md - - ProductAvailability: search/criteria_reference/productavailability_criterion.md - - ProductCategory: search/criteria_reference/productcategory_criterion.md - - ProductCode: search/criteria_reference/productcode_criterion.md - - ProductName: search/criteria_reference/productname_criterion.md - - ProductType: search/criteria_reference/producttype_criterion.md - - RangeMeasurementAttributeMinimum: search/criteria_reference/rangemeasurementattributeminimum_criterion.md - - RangeMeasurementAttributeMaximum: search/criteria_reference/rangemeasurementattributemaximum_criterion.md - - SimpleMeasurementAttribute: search/criteria_reference/simplemeasurementattribute_criterion.md - - SelectionAttribute: search/criteria_reference/selectionattribute_criterion.md - - Order Search Criteria: - - Order Search Criteria: search/criteria_reference/order_search_criteria.md - - CompanyName: search/criteria_reference/order_company_name_criterion.md - - CreatedAt: search/criteria_reference/order_created_criterion.md - - CurrencyCode: search/criteria_reference/order_currency_code_criterion.md - - CustomerName: search/criteria_reference/order_customer_name_criterion.md - - Identifier: search/criteria_reference/order_identifier_criterion.md - - IsCompanyAssociated: search/criteria_reference/order_company_associated_criterion.md - - Price: search/criteria_reference/order_price_criterion.md - - Source: search/criteria_reference/order_source_criterion.md - - Status: search/criteria_reference/order_status_criterion.md - - Payment Search Criteria: - - Payment Search Criteria: search/criteria_reference/payment_search_criteria.md - - CreatedAt: search/criteria_reference/payment_createdat_criterion.md - - Currency: search/criteria_reference/payment_currency_criterion.md - - Id: search/criteria_reference/payment_id_criterion.md - - Identifier: search/criteria_reference/payment_identifier_criterion.md - - LogicalAnd: search/criteria_reference/payment_logicaland_criterion.md - - LogicalOr: search/criteria_reference/payment_logicalor_criterion.md - - Order: search/criteria_reference/payment_order_criterion.md - - PaymentMethod: search/criteria_reference/payment_payment_method_criterion.md - - Status: search/criteria_reference/payment_status_criterion.md - - UpdatedAt: search/criteria_reference/payment_updatedat_criterion.md - - Payment Method Search Criteria: - - Payment Method Search Criteria: search/criteria_reference/payment_method_search_criteria.md - - CreatedAt: search/criteria_reference/payment_method_createdat_criterion.md - - Enabled: search/criteria_reference/payment_method_enabled_criterion.md - - Id: search/criteria_reference/payment_method_id_criterion.md - - Identifier: search/criteria_reference/payment_method_identifier_criterion.md - - LogicalAnd: search/criteria_reference/payment_method_logicaland_criterion.md - - LogicalOr: search/criteria_reference/payment_method_logicalor_criterion.md - - Type: search/criteria_reference/payment_method_type_criterion.md - - UpdatedAt: search/criteria_reference/payment_method_updatedat_criterion.md - - Shipment Search Criteria: - - Shipment Search Criteria: search/criteria_reference/shipment_search_criteria.md - - CreatedAt: search/criteria_reference/shipment_createdat_criterion.md - - Currency: search/criteria_reference/shipment_currency_criterion.md - - Id: search/criteria_reference/shipment_id_criterion.md - - Identifier: search/criteria_reference/shipment_identifier_criterion.md - - LogicalAnd: search/criteria_reference/shipment_logicaland_criterion.md - - LogicalOr: search/criteria_reference/shipment_logicalor_criterion.md - - ShippingMethod: search/criteria_reference/shipment_shipping_method_criterion.md - - StatusCriterion: search/criteria_reference/shipment_status_criterion.md - - UpdatedAtCriterion: search/criteria_reference/shipment_updatedat_criterion.md + - General Search Criteria: + - General Search Criteria reference: search/criteria_reference/search_criteria_reference.md + - Ancestor: search/criteria_reference/ancestor_criterion.md + - ContentId: search/criteria_reference/contentid_criterion.md + - ContentTypeGroupId: search/criteria_reference/contenttypegroupid_criterion.md + - ContentTypeId: search/criteria_reference/contenttypeid_criterion.md + - ContentTypeIdentifier: search/criteria_reference/contenttypeidentifier_criterion.md + - CurrencyCode: search/criteria_reference/currencycode_criterion.md + - CustomerGroupId: search/criteria_reference/customergroupid_criterion.md + - DateMetadata: search/criteria_reference/datemetadata_criterion.md + - Depth: search/criteria_reference/depth_criterion.md + - Field: search/criteria_reference/field_criterion.md + - FieldRelation: search/criteria_reference/fieldrelation_criterion.md + - FullText: search/criteria_reference/fulltext_criterion.md + - IsCurrencyEnabled: search/criteria_reference/iscurrencyenabled_criterion.md + - IsFieldEmpty: search/criteria_reference/isfieldempty_criterion.md + - IsMainLocation: search/criteria_reference/ismainlocation_criterion.md + - IsProductBased: search/criteria_reference/isproductbased_criterion.md + - IsUserBased: search/criteria_reference/isuserbased_criterion.md + - IsUserEnabled: search/criteria_reference/isuserenabled_criterion.md + - LanguageCode: search/criteria_reference/languagecode_criterion.md + - LocationId: search/criteria_reference/locationid_criterion.md + - LocationRemoteId: search/criteria_reference/locationremoteid_criterion.md + - MapLocationDistance: search/criteria_reference/maplocationdistance_criterion.md + - MatchAll: search/criteria_reference/matchall_criterion.md + - MatchNone: search/criteria_reference/matchnone_criterion.md + - ObjectStateId: search/criteria_reference/objectstateid_criterion.md + - ObjectStateIdentifier: search/criteria_reference/objectstateidentifier_criterion.md + - ParentLocationId: search/criteria_reference/parentlocationid_criterion.md + - Priority: search/criteria_reference/priority_criterion.md + - RemoteId: search/criteria_reference/remoteid_criterion.md + - SectionId: search/criteria_reference/sectionid_criterion.md + - SectionIdentifier: search/criteria_reference/sectionidentifier_criterion.md + - Sibling: search/criteria_reference/sibling_criterion.md + - Subtree: search/criteria_reference/subtree_criterion.md + - TaxonomyEntryID: search/criteria_reference/taxonomy_entry_id.md + - UserEmail: search/criteria_reference/useremail_criterion.md + - UserId: search/criteria_reference/userid_criterion.md + - UserLogin: search/criteria_reference/userlogin_criterion.md + - UserMetadata: search/criteria_reference/usermetadata_criterion.md + - Visibility: search/criteria_reference/visibility_criterion.md + - LogicalAnd Criterion: search/criteria_reference/logicaland_criterion.md + - LogicalNot Criterion: search/criteria_reference/logicalnot_criterion.md + - LogicalOr Criterion: search/criteria_reference/logicalor_criterion.md + - Product Search Criteria: + - Product Search Criteria: search/criteria_reference/product_search_criteria.md + - BasePrice: search/criteria_reference/baseprice_criterion.md + - CheckboxAttribute: search/criteria_reference/checkboxattribute_criterion.md + - ColorAttribute: search/criteria_reference/colorattribute_criterion.md + - CreatedAt: search/criteria_reference/createdat_criterion.md + - CreatedAtRange: search/criteria_reference/createdatrange_criterion.md + - CustomPrice: search/criteria_reference/customprice_criterion.md + - FloatAttribute: search/criteria_reference/floatattribute_criterion.md + - IntegerAttribute: search/criteria_reference/integerattribute_criterion.md + - ProductAvailability: search/criteria_reference/productavailability_criterion.md + - ProductCategory: search/criteria_reference/productcategory_criterion.md + - ProductCode: search/criteria_reference/productcode_criterion.md + - ProductName: search/criteria_reference/productname_criterion.md + - ProductType: search/criteria_reference/producttype_criterion.md + - RangeMeasurementAttributeMinimum: search/criteria_reference/rangemeasurementattributeminimum_criterion.md + - RangeMeasurementAttributeMaximum: search/criteria_reference/rangemeasurementattributemaximum_criterion.md + - SimpleMeasurementAttribute: search/criteria_reference/simplemeasurementattribute_criterion.md + - SelectionAttribute: search/criteria_reference/selectionattribute_criterion.md + - Order Search Criteria: + - Order Search Criteria: search/criteria_reference/order_search_criteria.md + - CompanyName: search/criteria_reference/order_company_name_criterion.md + - CreatedAt: search/criteria_reference/order_created_criterion.md + - CurrencyCode: search/criteria_reference/order_currency_code_criterion.md + - CustomerName: search/criteria_reference/order_customer_name_criterion.md + - Identifier: search/criteria_reference/order_identifier_criterion.md + - IsCompanyAssociated: search/criteria_reference/order_company_associated_criterion.md + - Price: search/criteria_reference/order_price_criterion.md + - Source: search/criteria_reference/order_source_criterion.md + - Status: search/criteria_reference/order_status_criterion.md + - Payment Search Criteria: + - Payment Search Criteria: search/criteria_reference/payment_search_criteria.md + - CreatedAt: search/criteria_reference/payment_createdat_criterion.md + - Currency: search/criteria_reference/payment_currency_criterion.md + - Id: search/criteria_reference/payment_id_criterion.md + - Identifier: search/criteria_reference/payment_identifier_criterion.md + - LogicalAnd: search/criteria_reference/payment_logicaland_criterion.md + - LogicalOr: search/criteria_reference/payment_logicalor_criterion.md + - Order: search/criteria_reference/payment_order_criterion.md + - PaymentMethod: search/criteria_reference/payment_payment_method_criterion.md + - Status: search/criteria_reference/payment_status_criterion.md + - UpdatedAt: search/criteria_reference/payment_updatedat_criterion.md + - Payment Method Search Criteria: + - Payment Method Search Criteria: search/criteria_reference/payment_method_search_criteria.md + - CreatedAt: search/criteria_reference/payment_method_createdat_criterion.md + - Enabled: search/criteria_reference/payment_method_enabled_criterion.md + - Id: search/criteria_reference/payment_method_id_criterion.md + - Identifier: search/criteria_reference/payment_method_identifier_criterion.md + - LogicalAnd: search/criteria_reference/payment_method_logicaland_criterion.md + - LogicalOr: search/criteria_reference/payment_method_logicalor_criterion.md + - Type: search/criteria_reference/payment_method_type_criterion.md + - UpdatedAt: search/criteria_reference/payment_method_updatedat_criterion.md + - Shipment Search Criteria: + - Shipment Search Criteria: search/criteria_reference/shipment_search_criteria.md + - CreatedAt: search/criteria_reference/shipment_createdat_criterion.md + - Currency: search/criteria_reference/shipment_currency_criterion.md + - Id: search/criteria_reference/shipment_id_criterion.md + - Identifier: search/criteria_reference/shipment_identifier_criterion.md + - LogicalAnd: search/criteria_reference/shipment_logicaland_criterion.md + - LogicalOr: search/criteria_reference/shipment_logicalor_criterion.md + - ShippingMethod: search/criteria_reference/shipment_shipping_method_criterion.md + - StatusCriterion: search/criteria_reference/shipment_status_criterion.md + - UpdatedAtCriterion: search/criteria_reference/shipment_updatedat_criterion.md + - URL Search Criteria: + - URL Search Criteria: search/url_search_reference/url_search_criteria.md + - MatchAll Criterion: search/url_search_reference/matchall_url_criterion.md + - MatchNone Criterion: search/url_search_reference/matchnone_url_criterion.md + - Pattern Criterion: search/url_search_reference/pattern_url_criterion.md + - SectionId Criterion: search/url_search_reference/sectionid_url_criterion.md + - SectionIdentifier Criterion: search/url_search_reference/sectionidentifier_url_criterion.md + - Validity Criterion: search/url_search_reference/validity_url_criterion.md + - VisibleOnly Criterion: search/url_search_reference/visibleonly_url_criterion.md + - LogicalAnd Criterion: search/url_search_reference/logicaland_url_criterion.md + - LogicalNot Criterion: search/url_search_reference/logicalnot_url_criterion.md + - LogicalOr Criterion: search/url_search_reference/logicalor_url_criterion.md - Sort Clause reference: - - Sort Clause reference: search/sort_clause_reference/sort_clause_reference.md - - ContentId: search/sort_clause_reference/contentid_sort_clause.md - - ContentName: search/sort_clause_reference/contentname_sort_clause.md - - ContentTranslatedName: search/sort_clause_reference/contenttranslatedname_sort_clause.md - - ContentTypeName: search/sort_clause_reference/contenttypename_sort_clause.md - - CustomField: search/sort_clause_reference/customfield_sort_clause.md - - DateModified: search/sort_clause_reference/datemodified_sort_clause.md - - DatePublished: search/sort_clause_reference/datepublished_sort_clause.md - - DateTrashed: search/sort_clause_reference/datetrashed_sort_clause.md - - Depth: search/sort_clause_reference/depth_sort_clause.md - - Field: search/sort_clause_reference/field_sort_clause.md - - Id: search/sort_clause_reference/id_sort_clause.md - - IsMainLocation: search/sort_clause_reference/ismainlocation_sort_clause.md - - MapLocationDistance: search/sort_clause_reference/maplocationdistance_sort_clause.md - - Path: search/sort_clause_reference/path_sort_clause.md - - Priority: search/sort_clause_reference/priority_sort_clause.md - - Random: search/sort_clause_reference/random_sort_clause.md - - Score: search/sort_clause_reference/score_sort_clause.md - - SectionIdentifier: search/sort_clause_reference/sectionidentifier_sort_clause.md - - SectionName: search/sort_clause_reference/sectionname_sort_clause.md - - UserLogin: search/sort_clause_reference/userlogin_sort_clause.md - - Visibility: search/sort_clause_reference/visibility_sort_clause.md - - Product Sort Clauses: - - Product Sort Clauses: search/sort_clause_reference/product_sort_clauses.md - - BasePrice: search/sort_clause_reference/baseprice_sort_clause.md - - CreatedAt: search/sort_clause_reference/createdat_sort_clause.md - - CustomPrice: search/sort_clause_reference/customprice_sort_clause.md - - ProductAvailability: search/sort_clause_reference/productavailability_sort_clause.md - - ProductCode: search/sort_clause_reference/productcode_sort_clause.md - - ProductName: search/sort_clause_reference/productname_sort_clause.md - - Order Sort Clauses: - - Order Sort Clauses: search/sort_clause_reference/order_sort_clauses.md - - Id: search/sort_clause_reference/order_id_sort_clause.md - - Created: search/sort_clause_reference/order_created_sort_clause.md - - Updated: search/sort_clause_reference/order_updated_sort_clause.md - - Status: search/sort_clause_reference/order_status_sort_clause.md - - Payment Sort Clauses: - - Payment Sort Clauses: search/sort_clause_reference/payment_sort_clauses.md - - Id: search/sort_clause_reference/payment_id_sort_clause.md - - Identifier: search/sort_clause_reference/payment_identifier_sort_clause.md - - CreatedAt: search/sort_clause_reference/payment_createdat_sort_clause.md - - UpdatedAt: search/sort_clause_reference/payment_updatedat_sort_clause.md - - Status: search/sort_clause_reference/payment_status_sort_clause.md - - Payment Method Sort Clauses: - - Payment Method Sort Clauses: search/sort_clause_reference/payment_method_sort_clauses.md - - CreatedAt: search/sort_clause_reference/payment_method_createdat_sort_clause.md - - Enabled: search/sort_clause_reference/payment_method_enabled_sort_clause.md - - Id: search/sort_clause_reference/payment_method_id_sort_clause.md - - Identifier: search/sort_clause_reference/payment_method_identifier_sort_clause.md - - UpdatedAt: search/sort_clause_reference/payment_method_updatedat_sort_clause.md - - Shipment Sort Clauses: - - Shipment Sort Clauses: search/sort_clause_reference/shipment_sort_clauses.md - - Id: search/sort_clause_reference/shipment_id_sort_clause.md - - Identifier: search/sort_clause_reference/shipment_identifier_sort_clause.md - - CreatedAt: search/sort_clause_reference/shipment_createdat_sort_clause.md - - UpdatedAt: search/sort_clause_reference/shipment_updatedat_sort_clause.md - - Status: search/sort_clause_reference/shipment_status_sort_clause.md + - General Sort Clauses: + - General Sort Clause reference: search/sort_clause_reference/sort_clause_reference.md + - ContentId: search/sort_clause_reference/contentid_sort_clause.md + - ContentName: search/sort_clause_reference/contentname_sort_clause.md + - ContentTranslatedName: search/sort_clause_reference/contenttranslatedname_sort_clause.md + - ContentTypeName: search/sort_clause_reference/contenttypename_sort_clause.md + - CustomField: search/sort_clause_reference/customfield_sort_clause.md + - DateModified: search/sort_clause_reference/datemodified_sort_clause.md + - DatePublished: search/sort_clause_reference/datepublished_sort_clause.md + - DateTrashed: search/sort_clause_reference/datetrashed_sort_clause.md + - Depth: search/sort_clause_reference/depth_sort_clause.md + - Field: search/sort_clause_reference/field_sort_clause.md + - Id: search/sort_clause_reference/id_sort_clause.md + - IsMainLocation: search/sort_clause_reference/ismainlocation_sort_clause.md + - MapLocationDistance: search/sort_clause_reference/maplocationdistance_sort_clause.md + - Path: search/sort_clause_reference/path_sort_clause.md + - Priority: search/sort_clause_reference/priority_sort_clause.md + - Random: search/sort_clause_reference/random_sort_clause.md + - Score: search/sort_clause_reference/score_sort_clause.md + - SectionIdentifier: search/sort_clause_reference/sectionidentifier_sort_clause.md + - SectionName: search/sort_clause_reference/sectionname_sort_clause.md + - UserLogin: search/sort_clause_reference/userlogin_sort_clause.md + - Visibility: search/sort_clause_reference/visibility_sort_clause.md + - Product Sort Clauses: + - Product Sort Clauses: search/sort_clause_reference/product_sort_clauses.md + - BasePrice: search/sort_clause_reference/baseprice_sort_clause.md + - CreatedAt: search/sort_clause_reference/createdat_sort_clause.md + - CustomPrice: search/sort_clause_reference/customprice_sort_clause.md + - ProductAvailability: search/sort_clause_reference/productavailability_sort_clause.md + - ProductCode: search/sort_clause_reference/productcode_sort_clause.md + - ProductName: search/sort_clause_reference/productname_sort_clause.md + - Order Sort Clauses: + - Order Sort Clauses: search/sort_clause_reference/order_sort_clauses.md + - Id: search/sort_clause_reference/order_id_sort_clause.md + - Created: search/sort_clause_reference/order_created_sort_clause.md + - Updated: search/sort_clause_reference/order_updated_sort_clause.md + - Status: search/sort_clause_reference/order_status_sort_clause.md + - Payment Sort Clauses: + - Payment Sort Clauses: search/sort_clause_reference/payment_sort_clauses.md + - Id: search/sort_clause_reference/payment_id_sort_clause.md + - Identifier: search/sort_clause_reference/payment_identifier_sort_clause.md + - CreatedAt: search/sort_clause_reference/payment_createdat_sort_clause.md + - UpdatedAt: search/sort_clause_reference/payment_updatedat_sort_clause.md + - Status: search/sort_clause_reference/payment_status_sort_clause.md + - Payment Method Sort Clauses: + - Payment Method Sort Clauses: search/sort_clause_reference/payment_method_sort_clauses.md + - CreatedAt: search/sort_clause_reference/payment_method_createdat_sort_clause.md + - Enabled: search/sort_clause_reference/payment_method_enabled_sort_clause.md + - Id: search/sort_clause_reference/payment_method_id_sort_clause.md + - Identifier: search/sort_clause_reference/payment_method_identifier_sort_clause.md + - UpdatedAt: search/sort_clause_reference/payment_method_updatedat_sort_clause.md + - Shipment Sort Clauses: + - Shipment Sort Clauses: search/sort_clause_reference/shipment_sort_clauses.md + - Id: search/sort_clause_reference/shipment_id_sort_clause.md + - Identifier: search/sort_clause_reference/shipment_identifier_sort_clause.md + - CreatedAt: search/sort_clause_reference/shipment_createdat_sort_clause.md + - UpdatedAt: search/sort_clause_reference/shipment_updatedat_sort_clause.md + - Status: search/sort_clause_reference/shipment_status_sort_clause.md + - URL Sort Clauses: + - URL Sort Clauses: search/url_search_reference/url_search_sort_clauses.md + - Id Sort Clause: search/url_search_reference/id_url_sort_clause.md + - Url Sort Clause: search/url_search_reference/url_url_sort_clause.md + - Search API: search/search_api.md - Aggregation reference: - Aggregation reference: search/aggregation_reference/aggregation_reference.md - ContentTypeTermAggregation: search/aggregation_reference/contenttypeterm_aggregation.md @@ -611,22 +630,7 @@ nav: - SelectionTermAggregation: search/aggregation_reference/selectionterm_aggregation.md - TaxonomyEntryIdAggregation: search/aggregation_reference/taxonomyentryid_aggregation.md - TimeRangeAggregation: search/aggregation_reference/timerange_aggregation.md - - URL search reference: - - URL search reference: search/url_search_reference/url_search_reference.md - - Id Sort Clause: search/url_search_reference/id_url_sort_clause.md - - Url Sort Clause: search/url_search_reference/url_url_sort_clause.md - - MatchAll Criterion: search/url_search_reference/matchall_url_criterion.md - - MatchNone Criterion: search/url_search_reference/matchnone_url_criterion.md - - Pattern Criterion: search/url_search_reference/pattern_url_criterion.md - - SectionId Criterion: search/url_search_reference/sectionid_url_criterion.md - - SectionIdentifier Criterion: search/url_search_reference/sectionidentifier_url_criterion.md - - Validity Criterion: search/url_search_reference/validity_url_criterion.md - - VisibleOnly Criterion: search/url_search_reference/visibleonly_url_criterion.md - - LogicalAnd Criterion: search/url_search_reference/logicaland_url_criterion.md - - LogicalNot Criterion: search/url_search_reference/logicalnot_url_criterion.md - - LogicalOr Criterion: search/url_search_reference/logicalor_url_criterion.md - Search in trash reference: search/search_in_trash_reference.md - - Search reindexing: search/search_reindexing.md - Extend search: - Create custom Search Criterion: search/extensibility/create_custom_search_criterion.md - Create custom Sort Clause: search/extensibility/create_custom_sort_clause.md From ae8437552fe65bbd400e30bfb13e7ac9bd969fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C4=85browski?= <64841871+dabrt@users.noreply.github.com> Date: Tue, 20 Jun 2023 10:44:49 +0200 Subject: [PATCH 5/7] Fix broken links --- docs/content_management/url_management/url_api.md | 2 +- plugins.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/content_management/url_management/url_api.md b/docs/content_management/url_management/url_api.md index 74d430780e..f20ca31944 100644 --- a/docs/content_management/url_management/url_api.md +++ b/docs/content_management/url_management/url_api.md @@ -27,4 +27,4 @@ in which you need to specify: ## URL search reference For the reference of Search Criteria and Sort Clauses you can use in URL search, -see [URL search reference](url_search_reference.md). +see [URL Search Criteria](url_search_criteria.md) and [URL Sort Clauses](url_search_sort_clauses.md). diff --git a/plugins.yml b/plugins.yml index e91826d469..d15df0518c 100644 --- a/plugins.yml +++ b/plugins.yml @@ -405,7 +405,8 @@ plugins: 'guide/search/aggregation_reference/keywordterm_aggregation.md': 'search/aggregation_reference/keywordterm_aggregation.md' 'guide/search/aggregation_reference/selectionterm_aggregation.md': 'search/aggregation_reference/selectionterm_aggregation.md' 'guide/search/aggregation_reference/timerange_aggregation.md': 'search/aggregation_reference/timerange_aggregation.md' - 'guide/search/url_search_reference/url_search_reference.md': 'search/url_search_reference/url_search_reference.md' + 'guide/search/url_search_reference/url_search_reference.md': 'search/url_search_reference/url_search_criteria.md' + 'search/url_search_reference/url_search_reference.md': 'search/url_search_reference/url_search_criteria.md' 'guide/search/url_search_reference/id_url_sort_clause.md': 'search/url_search_reference/id_url_sort_clause.md' 'guide/search/url_search_reference/url_url_sort_clause.md': 'search/url_search_reference/url_url_sort_clause.md' 'guide/search/url_search_reference/matchall_url_criterion.md': 'search/url_search_reference/matchall_url_criterion.md' From ba8ecc1f2d0f29709a2f390964769024a3195145 Mon Sep 17 00:00:00 2001 From: julitafalcondusza Date: Tue, 20 Jun 2023 14:47:20 +0200 Subject: [PATCH 6/7] Fixes after doc review --- .../create_custom_sort_clause.md | 2 +- ...search_reindexing.md => reindex_search.md} | 2 +- ...uration.md => configure_elastic_search.md} | 26 +++++++++---------- ...tallation.md => install_elastic_search.md} | 8 +++--- ...tion.md => configure_legacy_repository.md} | 4 +-- docs/search/search_engines/search_engines.md | 4 +-- ...olr_configuration.md => configure_solr.md} | 18 ++++++------- .../{solr_installation.md => install_solr.md} | 10 +++---- mkdocs.yml | 12 ++++----- 9 files changed, 43 insertions(+), 43 deletions(-) rename docs/search/{search_reindexing.md => reindex_search.md} (97%) rename docs/search/search_engines/elastic_search/{elastic_search_configuration.md => configure_elastic_search.md} (97%) rename docs/search/search_engines/elastic_search/{elastic_search_installation.md => install_elastic_search.md} (93%) rename docs/search/search_engines/legacy_search_engine/{legacy_repository_configuration.md => configure_legacy_repository.md} (77%) rename docs/search/search_engines/solr_search_engine/{solr_configuration.md => configure_solr.md} (96%) rename docs/search/search_engines/solr_search_engine/{solr_installation.md => install_solr.md} (98%) diff --git a/docs/search/extensibility/create_custom_sort_clause.md b/docs/search/extensibility/create_custom_sort_clause.md index 62e844054b..a372b43872 100644 --- a/docs/search/extensibility/create_custom_sort_clause.md +++ b/docs/search/extensibility/create_custom_sort_clause.md @@ -2,7 +2,7 @@ description: Create custom Sort Clause to use with Solr and Elasticsearch search engines. --- -# Create custom Search Criterion +# Create custom Sort Clause To create a custom Sort Clause, do the following. diff --git a/docs/search/search_reindexing.md b/docs/search/reindex_search.md similarity index 97% rename from docs/search/search_reindexing.md rename to docs/search/reindex_search.md index 3e96d073ce..81c64b041c 100644 --- a/docs/search/search_reindexing.md +++ b/docs/search/reindex_search.md @@ -2,7 +2,7 @@ description: Reindexing lets you create or refresh the search engine index. --- -# Search reindexing +# Reindex search To (re)create or refresh the search engine index for configured search engines (per SiteAccess repository), use the `php bin/console ibexa:reindex` command. diff --git a/docs/search/search_engines/elastic_search/elastic_search_configuration.md b/docs/search/search_engines/elastic_search/configure_elastic_search.md similarity index 97% rename from docs/search/search_engines/elastic_search/elastic_search_configuration.md rename to docs/search/search_engines/elastic_search/configure_elastic_search.md index 417dc36c99..e2a556e19e 100644 --- a/docs/search/search_engines/elastic_search/elastic_search_configuration.md +++ b/docs/search/search_engines/elastic_search/configure_elastic_search.md @@ -1,10 +1,10 @@ --- -description: Configure Elasticsearch to use with Ibexa DXP. +description: Configure Elasticsearch to use it with Ibexa DXP. --- -# Elasticsearch configuration +# Configure Elasticsearch -## Connections +## Configure connections To configure Elasticsearch, first, you need to configure the connections. @@ -38,7 +38,7 @@ solution from Elastic, as well as configure additional parameters. If you want to connect by using a cluster, follow the instructions below in the [Cluster](#cluster) section. If you want to use Elasticsearch Cloud, skip to [Elasticsearch Cloud](#elasticsearch-cloud) section. -## Cluster +## Configure clustering A cluster consists of nodes. You might start with one node and then add more nodes if you need more processing power. @@ -168,7 +168,7 @@ number of retries might differ. For more information, see [Set retries](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/configuration.html#_set_retries). -## Elasticsearch Cloud +## Configure Elasticsearch Cloud As an alternative to using your own cluster, you can use Elasticsearch Cloud, a commercial SaaS solution. With Elasticsearch Cloud you do not have to build or manage your own Elasticsearch cluster. @@ -184,7 +184,7 @@ providing an alphanumerical ID string that you get from the cloud's user interfa With the ID set, you must configure authentication to be able to access the remote environment. -## Security +## Configure security Elasticsearch instances support `basic` and `api_key` authentication methods. You select authentication type and configure the settings under the `authentication` key. By default, authentication is disabled: @@ -310,7 +310,7 @@ verification: false For more information, see [Elasticsearch: SSL Encyption](https://www.elastic.co/guide/en/elasticsearch/client/php-api/7.x/security.html#_ssl_encryption_2). -### Enabling debugging +### Enable debugging In a staging environment, you can log messages about the status of communication with Elasticsearch. You can then use Symfony Profiler to review the logs. @@ -331,7 +331,7 @@ By default, debugging is disabled. To enable debugging, you can toggle either of Make sure that you disable debugging in a production environment. -## Field Type mapping templates +## Define Field Type mapping templates Before you can re-index the [[= product_name =]] data, so that Elasticsearch can search through its contents, you must define an index template. Templates instruct Elasticsearch to recognize [[= product_name =]] Fields as specific data types, based on, for example, a field name. @@ -339,7 +339,7 @@ They help you prevent Elasticsearch from using the dynamic field mapping feature You can create several Field Type mapping templates for each index, for example, to define settings that are specific for different languages. When you establish a relationship between a field mapping template and a connection, you can apply several templates, too. -### Defining a template +### Define a template To define a field mapping template, you must provide settings under the `index_templates` key. The structure of the template is as follows: @@ -416,7 +416,7 @@ For more information about mappings, see [Elasticsearch documentation](https://w For an example of default configuration with a list of searchable fields. To see the default configuration, go to `vendor/ibexa/elasticsearch/src/bundle/Resources/config/` and open the `default-config.yaml` file. -### Fine-tuning the search results +### Fine-tune the search results Your search results can be adjusted by configuring additional parameters. For a list of available mapping parameters and their usage, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/mapping-params.html). @@ -475,7 +475,7 @@ ibexa_elasticsearch: # ... ``` -## Binding templates with connections +## Bind templates with connections Once you have created the field mapping template(s), you must establish a relationship between the templates and a connection. You do this by adding the "index_templates" key to a connection definition. @@ -492,7 +492,7 @@ If you have several index templates, you can apply different combinations of tem For more information about how Elasticsearch handles settings and mappings from multiple templates that match the same index, see [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/indices-templates-v1.html#multiple-templates-v1). -# Extending Elasticsearch +# Extend Elasticsearch To learn how you can create document field mappers, custom Search Criteria, -custom Sort Clauses and Aggregations, see [Search extensibility](create_custom_search_criterion.md). +custom Sort Clauses and Aggregations, see [Create custom Search Criterion](create_custom_search_criterion.md). diff --git a/docs/search/search_engines/elastic_search/elastic_search_installation.md b/docs/search/search_engines/elastic_search/install_elastic_search.md similarity index 93% rename from docs/search/search_engines/elastic_search/elastic_search_installation.md rename to docs/search/search_engines/elastic_search/install_elastic_search.md index 7692f92520..fe124934b4 100644 --- a/docs/search/search_engines/elastic_search/elastic_search_installation.md +++ b/docs/search/search_engines/elastic_search/install_elastic_search.md @@ -1,8 +1,8 @@ --- -description: Install Elasticsearch to use with Ibexa DXP. +description: Install Elasticsearch to use it with Ibexa DXP. --- -# Elasticsearch installation +# Install Elasticsearch ## Download and install Elasticsearch @@ -64,9 +64,9 @@ All configuration is made in the `/config/packages/ibexa_elasticsearch.yaml` fil the Elasticsearch documentation. First, decide how [[= product_name =]] connects to Elasticsearch and configure other connection settings. -For more information, see [Configuring connections](#connections). +For more information, see [Configuring connections](configure_elasticsearch.md#connections). -Then, define a Field Type mappings template that instructs Elasticsearch to interpret [[= product_name =]] fields as specific types. For more information, see [Configuring Field Type mappings](#field-type-mapping-templates). +Then, define a Field Type mappings template that instructs Elasticsearch to interpret [[= product_name =]] fields as specific types. For more information, see [Configuring Field Type mappings](configure_elasticsearch.md#field-type-mapping-templates). ## Push the templates diff --git a/docs/search/search_engines/legacy_search_engine/legacy_repository_configuration.md b/docs/search/search_engines/legacy_search_engine/configure_legacy_repository.md similarity index 77% rename from docs/search/search_engines/legacy_search_engine/legacy_repository_configuration.md rename to docs/search/search_engines/legacy_search_engine/configure_legacy_repository.md index 4975074b4f..2f7de7dc66 100644 --- a/docs/search/search_engines/legacy_search_engine/legacy_repository_configuration.md +++ b/docs/search/search_engines/legacy_search_engine/configure_legacy_repository.md @@ -1,8 +1,8 @@ --- -description: Configure Legacy search engine to use with Ibexa DXP. +description: Configure Legacy search engine to use it with Ibexa DXP. --- -# Repository configuration with Legacy search engine +# Configure repository with Legacy search engine Search can be configured independently from storage, and the following configuration example shows both the default values, and how you configure legacy as the search engine: diff --git a/docs/search/search_engines/search_engines.md b/docs/search/search_engines/search_engines.md index c33fa3ea9a..a710ddf405 100644 --- a/docs/search/search_engines/search_engines.md +++ b/docs/search/search_engines/search_engines.md @@ -1,10 +1,10 @@ --- -description: Ibexa DXP enables you to use Solr or Elasticsearch search engines, in addition to the built-in legacy search engine which has limited functionalities. +description: Learn about different search engines that are supported by Ibexa DXP. --- # Search engines -[[= product_name =]] enables you to use search engines. +[[= product_name =]] enables you to use different search engines. Currently, they exist in their own [[= product_name =]] Bundles: 1. [Legacy search engine](legacy_search_overview.md) - a database-powered search engine for basic needs. diff --git a/docs/search/search_engines/solr_search_engine/solr_configuration.md b/docs/search/search_engines/solr_search_engine/configure_solr.md similarity index 96% rename from docs/search/search_engines/solr_search_engine/solr_configuration.md rename to docs/search/search_engines/solr_search_engine/configure_solr.md index e9b84c5839..b1f58d206f 100644 --- a/docs/search/search_engines/solr_search_engine/solr_configuration.md +++ b/docs/search/search_engines/solr_search_engine/configure_solr.md @@ -1,10 +1,10 @@ --- -description: Configure Solr search engine to use with Ibexa DXP. +description: Configure Solr search engine to use it with Ibexa DXP. --- -# Solr configuration +# Configure Solr -## Boost configuration +## Configure boosting !!! caution "Index time boosting" @@ -123,7 +123,7 @@ The configuration above will result in the following boosting (Content Type / Fi - `folder/name: 20.0` - `folder/description: 10.0` -## Indexing related objects +## Index related objects You can use indexation of related objects to search through text of related content. Indexing is disabled by default. @@ -143,13 +143,13 @@ ibexa_solr: article: 2 ``` -## Configuring Solr Replication (master/slave) +## Configure Solr Replication (master/slave) !!! note The configuration below has been tested on Solr 7.7. -### Configuring Master for replication +### Configure Master for replication First you need to change the core configuration in `solrconfig.xml` (for example `*/opt/solr/server/ibexa/collection1/conf/solrconfig.xml`). You can copy and paste the code below before any other `requestHandler` section. @@ -176,7 +176,7 @@ Then restart the master with: sudo su - solr -c "/opt/solr/bin/solr restart" ``` -### Configuring Slave for replication +### Configure Slave for replication You have to edit the same file on the slave server, and use the code below: @@ -224,7 +224,7 @@ Connect to the Solr slave interface (http://localhost:8983/solr), go to your cor ![Solr Slave](solr.png) -# Configuring HTTP Client for Solr queries +# Configure HTTP Client for Solr queries Ibexa Solr Bundle uses Symfony HTTP Client to fetch and update Solr index. You can configure timeout and maximum number of retries for that client using Solr Bundle's Semantic configuration: @@ -238,7 +238,7 @@ ibexa_solr: max_retries: 5 ``` -# Extending Solr +# Extend Solr To learn how you can create document field mappers, custom Search Criteria, custom Sort Clauses and Aggregations, see [Search extensibility](create_custom_search_criterion.md). diff --git a/docs/search/search_engines/solr_search_engine/solr_installation.md b/docs/search/search_engines/solr_search_engine/install_solr.md similarity index 98% rename from docs/search/search_engines/solr_search_engine/solr_installation.md rename to docs/search/search_engines/solr_search_engine/install_solr.md index 2e5ed54539..feda28b954 100644 --- a/docs/search/search_engines/solr_search_engine/solr_installation.md +++ b/docs/search/search_engines/solr_search_engine/install_solr.md @@ -1,15 +1,15 @@ --- -description: Install Solr search engine to use with Ibexa DXP. +description: Install Solr search engine to use it with Ibexa DXP. --- -# Solr search engine installation +# Install Solr search engine ## Configure and start Solr The example presents a configuration with a single core. For configuring Solr in other ways, including examples, see [Solr Cores and `solr.xml`](https://cwiki.apache.org/confluence/display/solr/Solr+Cores+and+solr.xml) and [core administration](https://wiki.apache.org/solr/CoreAdmin). -### Download and configure +### Download Solr files !!! note "Solr versions" @@ -52,7 +52,7 @@ SolrCloud is a cluster of Solr servers. It enables you to: To set SolrCloud up follow [SolrCloud reference guide.](https://lucene.apache.org/solr/guide/7_7/solrcloud.html) -### Further configuration +### Continue Solr configuration The bundle does not commit Solr index changes directly on Repository updates, leaving it up to you to tune this using `solrconfig.xml` as best practice suggests. @@ -72,7 +72,7 @@ This setting is **required** if you want to see the changes after publish. It is ``` -### Generating configuration +### Generate Solr configuration automatically The command line tool `bin/generate-solr-config.sh` generates Solr 7 configuration automatically. It can be used for deploying to Ibexa Cloud (Platform.sh) and on-premise installs. diff --git a/mkdocs.yml b/mkdocs.yml index 6a888fbd1b..175a1f89e8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -403,16 +403,15 @@ nav: - Search engines: search/search_engines/search_engines.md - Elasticsearch search engine: - Overview: search/search_engines/elastic_search/elastic_search_overview.md - - Installation: search/search_engines/elastic_search/elastic_search_installation.md - - Configuration: search/search_engines/elastic_search/elastic_search_configuration.md + - Install Elasticsearch: search/search_engines/elastic_search/install_elastic_search.md + - Configure Elasticsearch: search/search_engines/elastic_search/configure_elastic_search.md - Solr search engine: - Overview: search/search_engines/solr_search_engine/solr_overview.md - - Installation: search/search_engines/solr_search_engine/solr_installation.md - - Configuration: search/search_engines/solr_search_engine/solr_configuration.md + - Install Solr: search/search_engines/solr_search_engine/install_solr.md + - Configure Solr: search/search_engines/solr_search_engine/configure_solr.md - Legacy search engine: - Overview: search/search_engines/legacy_search_engine/legacy_search_overview.md - - Repository configuration: search/search_engines/legacy_search_engine/legacy_repository_configuration.md - - Reindex search: search/search_reindexing.md + - Configure repository: search/search_engines/legacy_search_engine/configure_repository.md - Search Criteria and Sort Clauses: search/search_criteria_and_sort_clauses.md - Search Criteria reference: - General Search Criteria: @@ -639,6 +638,7 @@ nav: - Index custom Elasticsearch data: search/extensibility/index_custom_elasticsearch_data.md - Customize Elasticsearch index structure: search/extensibility/customize_elasticsearch_index_structure.md - Manipulate Elasticsearch query: search/extensibility/manipulate_elasticsearch_query.md + - Reindex search: search/reindex_search.md - Infrastructure and maintenance: - Infrastructure and maintenance: infrastructure_and_maintenance/infrastructure_and_maintenance.md - Request lifecycle: infrastructure_and_maintenance/request_lifecycle.md From f354aeef861a3eae3ccb2fb7432efdaadcfe1b5b Mon Sep 17 00:00:00 2001 From: julitafalcondusza Date: Tue, 20 Jun 2023 14:54:56 +0200 Subject: [PATCH 7/7] Page renamed --- .../search_engines/elastic_search/install_elastic_search.md | 4 ++-- ...configure_legacy_repository.md => configure_repository.md} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename docs/search/search_engines/legacy_search_engine/{configure_legacy_repository.md => configure_repository.md} (100%) diff --git a/docs/search/search_engines/elastic_search/install_elastic_search.md b/docs/search/search_engines/elastic_search/install_elastic_search.md index fe124934b4..099df55fa7 100644 --- a/docs/search/search_engines/elastic_search/install_elastic_search.md +++ b/docs/search/search_engines/elastic_search/install_elastic_search.md @@ -64,9 +64,9 @@ All configuration is made in the `/config/packages/ibexa_elasticsearch.yaml` fil the Elasticsearch documentation. First, decide how [[= product_name =]] connects to Elasticsearch and configure other connection settings. -For more information, see [Configuring connections](configure_elasticsearch.md#connections). +For more information, see [Configuring connections](configure_elastic_search.md#connections). -Then, define a Field Type mappings template that instructs Elasticsearch to interpret [[= product_name =]] fields as specific types. For more information, see [Configuring Field Type mappings](configure_elasticsearch.md#field-type-mapping-templates). +Then, define a Field Type mappings template that instructs Elasticsearch to interpret [[= product_name =]] fields as specific types. For more information, see [Configuring Field Type mappings](configure_elastic_search.md#field-type-mapping-templates). ## Push the templates diff --git a/docs/search/search_engines/legacy_search_engine/configure_legacy_repository.md b/docs/search/search_engines/legacy_search_engine/configure_repository.md similarity index 100% rename from docs/search/search_engines/legacy_search_engine/configure_legacy_repository.md rename to docs/search/search_engines/legacy_search_engine/configure_repository.md