Giter Club home page Giter Club logo

module-disable-search-engine's Introduction

Disable Search Engine

Disable default search engine in Magento2 and catalog search fulltext indexing.

Purpose

When catalog search and display are not handled by your Magento it could be redundant to integrate ES in your architecture.

You may have a PIM dedicated for this, or maybe you are designing a microservice architecture, you want to smooth the Magento monolith aspect etc...

Natively Magento do not offer the possibility to completely disable ElasticSearch, this module made it possible.

What it does

  • Make Elasticsearch service no longer required to install and run Magento2.
  • Set value "none" as default search engine
  • Return empty response from front-end queries
  • Uninstall magento modules:
    • magento/module-elasticsearch-catalog-permissions
    • magento/module-elasticsearch-catalog-permissions-graph-ql
    • magento/module-inventory-elasticsearch
    • magento/module-elasticsearch
    • magento/module-elasticsearch-6
    • magento/module-elasticsearch-7
    • magento/module-open-search

You should have no issue with indexation, compilation and even front-end research, which should always return no result.

Compatibility

Magento v2.3.0 v2.4.3 v2.4.4 v2.4.6
module DSE ~0.0.0 ~0.1.0 ~0.2.0 ~0.3.0

Notes

  • v0.1.0: adding indexer handler (Magento 2.4.3)
  • v0.2.0: the magento/module-advanced-search has been reintroduced due to a dependency in magento/module-catalog-graph-ql (Magento 2.4.4).
  • v0.3.0: uninstalling magento/module-open-search

Installation

composer require zepgram/module-disable-search-engine
bin/magento module:enable Zepgram_DisableSearchEngine
bin/magento setup:upgrade

Issue

If you encountered an issue, please report it on this GitHub repository.

module-disable-search-engine's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

module-disable-search-engine's Issues

Error while run cli command indexer:reindex - Magento 2.4.3

When we run the Magento2 (v2.4.3) indexer via CLI, an exception occurs at the Catalog Search index, which is apparently not yet caught by the Disable-Search-Engine-Module (v0.1.1). This error occurs in all our environments.

Catalog Search index [2022-05-04 07:39:58] main.CRITICAL: Type Error occurred when creating object: Magento\Search\Model\EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121 [] []
process error during indexation process:
Type Error occurred when creating object: Magento\Search\Model\EngineResolver, Argument 2 passed to Magento\Search\Model\EngineResolver::__construct() must be of the type array, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

How to uninstall?

I installed the extension on a fresh magento. Then I tried to uninstall the extension again with composer remove zepgram/module-disable-search-engine.

But now I get this error if I execute php bin/magento setup:upgrade

Missing required argument $engines of Magento\Search\Model\EngineResolver

Magento 2.4.5 doesn't works

fox@fox:/var/www/sert.loc$ composer require zepgram/module-disable-search-engine --ignore-platform-reqs -v

pre-command-run: Laminas\DependencyPlugin\DependencyRewriterPluginDelegator->onPreCommandRun
pre-command-run: Magento\ComposerRootUpdatePlugin\Plugin\PluginDefinition->checkForDeprecatedRequire
Found package xox/theme-frontend (0.0.1) in file theme-frontend.zip
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^0.3.0 for zepgram/module-disable-search-engine
./composer.json has been updated
Running composer update zepgram/module-disable-search-engine
command: MagentoHackathon\Composer\Magento\Plugin_composer_tmp3->onCommandEvent
pre-update-cmd: Magento\InventoryComposerInstaller\Plugin_composer_tmp4->initModuleDeployment
Loading composer repositories with package information
Found package xox/theme-frontend (0.0.1) in file theme-frontend.zip
pre-pool-create: Laminas\DependencyPlugin\DependencyRewriterPluginDelegator_composer_tmp0->onPrePoolCreate
In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
pre-pool-create: Magento\ComposerDependencyVersionAuditPlugin\Plugin_composer_tmp2->prePoolCreate
Updating dependencies
Dependency resolution completed in 0.028 seconds
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires zepgram/module-disable-search-engine ^0.3.0 -> satisfiable by zepgram/module-disable-search-engine[0.3.0].
- zepgram/module-disable-search-engine 0.3.0 requires magento/framework ^103.0.6 -> found magento/framework[103.0.6, 103.0.6-p1, 103.0.6-p2] but the package is fixed to 103.0.5 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require zepgram/module-disable-search-engine:*" to figure out if any version is installable, or "composer require zepgram/module-disable-search-engine:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

how to do this with a new install

If I have a fresh install, how should I do this? Because these are not working then

 php -d disable_functions=none bin/magento module:uninstall Magento_AdvancedSearch
You cannot run this command because the Magento application is not installed.

php -d disable_functions=none ../composer-2.phar remove magento/AdvancedSearch

Magento_InventoryElasticsearch

Thanks for this module!

I just installed it and noticed that the module Magento_InventoryElasticsearch is still present and enabled, even though I expected it to be replaced as well. I did not run into issues with it yet, but maybe it is worth having a look at that?

Compiling issue

Hello,

I installed the module '0.1.0' on Magento 2.4.3 p-1
Getting an error when compiling setup:di:compile
Impossible to process constructor argument Parameter #0 [ <required> Magento\Elasticsearch\Mode l\ResourceModel\Fulltext\Collection\SearchResultApplierFactory $elasticSearchResultApplierFacto ry ] of Amasty\Shopby\Model\ResourceModel\Fulltext\Collection\SearchResultApplier class

Class Magento\Elasticsearch\Model\ResourceModel\Fulltext\Collection\SearchResultApplierFactory does not exist

We have Amasty_LayeredNavigation installed on the site.

Can't install on Magento 2.4.2

I get a few problems:

company@rb-VirtualBox:/var/www/company/m2$ memcomposer require zepgram/module-disable-search-engine
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^0.2.0 for zepgram/module-disable-search-engine
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: magento/module-catalog-search[102.0.4, 102.0.2].
    - Can only install one of: magento/module-catalog-search[102.0.4, 102.0.2].
    - Can only install one of: magento/module-catalog-search[102.0.4, 102.0.2].
    - zepgram/module-disable-search-engine 0.2.0 requires magento/module-catalog-search ^102.0.4 -> satisfiable by magento/module-catalog-search[102.0.4].
    - Installation request for zepgram/module-disable-search-engine ^0.2.0 -> satisfiable by zepgram/module-disable-search-engine[0.2.0].
    - Installation request for magento/module-catalog-search (locked at 102.0.2) -> satisfiable by magento/module-catalog-search[102.0.2].


Installation failed, reverting ./composer.json to its original content.

I also tried it with composer v2

company@rb-VirtualBox:/var/www/company/fresh_m242$ composer2 require zepgram/module-disable-search-engine
Using version ^0.2.0 for zepgram/module-disable-search-engine
./composer.json has been updated
Running composer update zepgram/module-disable-search-engine
Loading composer repositories with package information
In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires zepgram/module-disable-search-engine ^0.2.0 -> satisfiable by zepgram/module-disable-search-engine[0.2.0].
    - zepgram/module-disable-search-engine 0.2.0 requires magento/framework ^103.0.4 -> found magento/framework[103.0.4] but the package is fixed to 103.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require zepgram/module-disable-search-engine:*" to figure out if any version is installable, or "composer require zepgram/module-disable-search-engine:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

In Category Product Not Showing

Added Module with Composer but facing issue in Category page Product not display can you help on this, in log we faced this type of error
image

I can't get this to install - what am I doing wrong?

Hello, please be patient with me. I am new to Magento 2 & just trying to figure this out.

When I ran the command: composer require zepgram/module-disable-search-engine
bin/magento module:enable Zepgram_DisableSearchEngine
bin/magento setup:upgrade in composer - I got the following error:

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
]# bin/magento module:enable Zepgram_DisableSearchEngine
-bash: bin/magento: Permission denied
]# bin/magento setup:upgrade
-bash: bin/magento: Permission denied
]#
File permissons are set to 0644, Directories: 0755. (even tried setting files to: 660 & folders to: 770) Same message.
(I deleted my site info from the above)

Any help would be greatly appreciated. Also - once this is working, will I be able to add an extension for search or will this disable the function forever? Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.