Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add documentation
Jakub Draganek70982d09de6f
diff --git a/docs/index.rst b/docs/index.rstindex b3d84f59a7..dfb7258f99 100644--- a/docs/index.rst+++ b/docs/index.rst@@ -13,6 +13,7 @@ Contents:productsstocksettings+ searchlocalizationseopaymentsdiff --git a/docs/postgres_search.rst b/docs/postgres_search.rstnew file mode 100644index 0000000000..bd1e722d14--- /dev/null+++ b/docs/postgres_search.rst@@ -0,0 +1,35 @@+PostgreSQL full text search+=============+++Installation+------------++No additional external dependency is required to enable PostgreSQL search apart from database itself.++If your server runs on distribution (ex. Ubuntu) that splits postgresql package into base and contrib, both must be installed. Database extension won't work otherwise.+++Environment variables+---------------------++PostgreSQL search is enabled by default if elasticsearch is not configured. No enviroment variable is needed.+++Data indexing+-------------++Index is not essential for postgres search. For performance optimization reasons `PostgreSQL Gin index <https://www.postgresql.org/docs/current/static/gin.html>` is created by default on product model for name and description field. Index usage is transparent to user and no additional action is required for index to stay up to date.+++Search integration architecture+-------------------------------+++There are two backend modules defined in saleor/search/backends, one for storefront and one for dashboard search. There is picker module in backends package for picking right backend, depending on configuration.+++Testing+-------++Virtually all testing is done in `integration test suite <https://github.com/github/saleor/blob/master/saleor/tests/test_postgresql_search.py>`.diff --git a/docs/search.rst b/docs/search.rstnew file mode 100644index 0000000000..2b15573b00--- /dev/null+++ b/docs/search.rst@@ -0,0 +1,23 @@+Search+=============++There are two possible mechanisms supporting search in saleor. PostgreSQL full text search capability can be used or external Elasticsearch service.++PostgreSQL full text search+---------------------------++PostgreSQL search in enabled by default, see :doc:`postgresql_search` for more information.+++Elasticsearch+-------------++You can integrate saleor with Elasticsearch service, see :doc:`elasticsearch` for more.+++Which one to choose+-------------------++Your preference for search backend might depend heavily on project details. PostgreSQL search uses same database as other parts of saleor, which comes with both pros and cons, making it easy to synchronise content at cost of additional db load. It should be your backend of choice if in doubt as its less complex and easier to maintain. Continue reading on dedicated doc :doc:`postgresql_search`.++Elasticsearch service offers a lot of advanced features, such as boosting to tune the relevance of a query or "more like this" queries. See `official website <https://www.elastic.co/products/elasticsearch>` to read more about its rich features. To configure elasticsearch in saleor see :doc:`elasticsearch`.