From 6915e281df5f979046f81a4141aa7cd72aa0b3c5 Mon Sep 17 00:00:00 2001 From: Ndifreke Ekott Date: Wed, 24 Jun 2020 17:35:29 +0100 Subject: [PATCH 1/2] Disabling Elasticsearch for an operation If you have added elasticsearch to your api-platform and later remove it or prefer to fetch the data from the database rather than Elasticsearch, you can achieve this by adding the parameter `elasticsearch: false` to your operation. --- core/operations.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/core/operations.md b/core/operations.md index ca2c778fd07..02b3f34e4f0 100644 --- a/core/operations.md +++ b/core/operations.md @@ -595,3 +595,45 @@ final class SwaggerDecorator implements NormalizerInterface ``` That's it: your route is gone! + +## Disabling ElasticSearch on Operations +After enabling [Elasticsearch Support](elasticsearch.md) in your project, there may come a time you would prefer not to read your data from your Elasticsearch server and would rather fetch your data directly from your database. To achieve this, you can pass in a parameter to your api operation with the value `elasticsearch: true`. A simple example is below. + +```php + Date: Mon, 29 Jun 2020 12:30:34 +0100 Subject: [PATCH 2/2] Update core/operations.md Co-authored-by: Antoine Bluchet --- core/operations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/operations.md b/core/operations.md index 02b3f34e4f0..2ad2fbae53b 100644 --- a/core/operations.md +++ b/core/operations.md @@ -597,7 +597,8 @@ final class SwaggerDecorator implements NormalizerInterface That's it: your route is gone! ## Disabling ElasticSearch on Operations -After enabling [Elasticsearch Support](elasticsearch.md) in your project, there may come a time you would prefer not to read your data from your Elasticsearch server and would rather fetch your data directly from your database. To achieve this, you can pass in a parameter to your api operation with the value `elasticsearch: true`. A simple example is below. +After enabling [Elasticsearch Support](elasticsearch.md) in your project, there may come a time you would prefer not to read your data from your Elasticsearch server and would rather fetch your data directly from your database. To achieve this, you can pass in a parameter to your api operation with the value `elasticsearch: true`. +For example: ```php