From 2dd86b6258dafc63f033311464d3d03e5db6da39 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 10 Feb 2021 16:24:22 -0500 Subject: [PATCH] (DOCSP-13152): Improve Atlas Search callouts updates per review --- source/core/index-text.txt | 2 -- source/core/text-search-operators.txt | 2 ++ source/includes/fact-atlas-search-languages.rst | 4 ++++ source/includes/fact-atlas-search-search-stage.rst | 3 +++ source/includes/fact-text-index-limit-one.rst | 5 +++++ source/reference/operator/query/text.txt | 11 +++++++++-- source/reference/text-search-languages.txt | 2 ++ source/text-search.txt | 4 ++-- source/tutorial/control-results-of-text-search.txt | 7 +++++++ source/tutorial/text-search-in-aggregation.txt | 9 +++++++-- 10 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 source/includes/fact-atlas-search-languages.rst create mode 100644 source/includes/fact-atlas-search-search-stage.rst diff --git a/source/core/index-text.txt b/source/core/index-text.txt index 7830f75a14d..b67489a437c 100644 --- a/source/core/index-text.txt +++ b/source/core/index-text.txt @@ -12,8 +12,6 @@ Text Indexes :depth: 1 :class: singlecol -.. include:: /includes/fact-atlas-search-banner.rst - Overview -------- diff --git a/source/core/text-search-operators.txt b/source/core/text-search-operators.txt index cb4a88def1d..89c99b6ad96 100644 --- a/source/core/text-search-operators.txt +++ b/source/core/text-search-operators.txt @@ -53,6 +53,8 @@ For more information and examples of text search in the :doc:`/aggregation` framework, see :doc:`/tutorial/text-search-in-aggregation`. +.. include:: /includes/fact-atlas-search-search-stage.rst + .. [#meta-aggregation] .. include:: /includes/fact-meta-operator-disambiguation.rst diff --git a/source/includes/fact-atlas-search-languages.rst b/source/includes/fact-atlas-search-languages.rst new file mode 100644 index 00000000000..f0aae591ffd --- /dev/null +++ b/source/includes/fact-atlas-search-languages.rst @@ -0,0 +1,4 @@ +For data hosted on MongoDB Atlas, :atlas:`Atlas Search ` +provides support for additional languages. To see the complete list of +languages supported by Atlas Search, see the :atlas:`Atlas Search +Language Analyzers `. diff --git a/source/includes/fact-atlas-search-search-stage.rst b/source/includes/fact-atlas-search-search-stage.rst new file mode 100644 index 00000000000..5ed329bde0d --- /dev/null +++ b/source/includes/fact-atlas-search-search-stage.rst @@ -0,0 +1,3 @@ +For data hosted on MongoDB Atlas, :atlas:`Atlas Search ` +provides the :atlas:`$search ` +aggregation stage to perform full-text search on your collections. diff --git a/source/includes/fact-text-index-limit-one.rst b/source/includes/fact-text-index-limit-one.rst index 1eab8c85e40..005dc4ff5a0 100644 --- a/source/includes/fact-text-index-limit-one.rst +++ b/source/includes/fact-text-index-limit-one.rst @@ -1 +1,6 @@ A collection can have at most **one** ``text`` index. + +Atlas Search (available in `MongoDB Atlas +`__) supports +multiple full-text search indexes on a single collection. To learn more, +see the :atlas:`Atlas Search documentation `. diff --git a/source/reference/operator/query/text.txt b/source/reference/operator/query/text.txt index c2b0de1b192..828171bc244 100644 --- a/source/reference/operator/query/text.txt +++ b/source/reference/operator/query/text.txt @@ -10,8 +10,6 @@ $text :depth: 1 :class: singlecol -.. include:: /includes/fact-atlas-search-banner.rst - Definition ---------- @@ -165,6 +163,15 @@ The :query:`text` operator treats most punctuation in the string as delimiters, except a hyphen-minus (``-``) that negates term or an escaped double quotes ``\"`` that specifies a phrase. +.. note:: + + The ``$search`` field for the :query:`$text` expression is different + than the the :atlas:`$search aggregation stage + ` provided by + :atlas:`Atlas Search `. The ``$search`` aggregation + stage performs full-text search on specified fields and is only + available on MongoDB Atlas. + .. _text-operator-phrases: Phrases diff --git a/source/reference/text-search-languages.txt b/source/reference/text-search-languages.txt index ceb3d9eb407..cb91cf761b3 100644 --- a/source/reference/text-search-languages.txt +++ b/source/reference/text-search-languages.txt @@ -74,5 +74,7 @@ language name: .. include:: /includes/fact-text-search-language-none.rst +.. include:: /includes/fact-atlas-search-languages.rst + .. seealso:: :doc:`/tutorial/specify-language-for-text-index` diff --git a/source/text-search.txt b/source/text-search.txt index b495e198a18..b40f7780f9c 100644 --- a/source/text-search.txt +++ b/source/text-search.txt @@ -10,8 +10,6 @@ Text Search :depth: 1 :class: singlecol -.. include:: /includes/fact-atlas-search-banner.rst - Overview -------- @@ -108,6 +106,8 @@ MongoDB supports text search for various languages. See :doc:`/reference/text-search-languages` for a list of supported languages. +.. include:: /includes/fact-atlas-search-languages.rst + .. toctree:: :titlesonly: :hidden: diff --git a/source/tutorial/control-results-of-text-search.txt b/source/tutorial/control-results-of-text-search.txt index 168bc2dca0e..12fde342f14 100644 --- a/source/tutorial/control-results-of-text-search.txt +++ b/source/tutorial/control-results-of-text-search.txt @@ -77,3 +77,10 @@ each other. For instance, a term match in the ``content`` field has: - ``10`` times (i.e. ``10:1``) the impact as a term match in the ``about`` field. + +.. note:: + + For data hosted on MongoDB Atlas, + :atlas:`Atlas Search ` provides more robust custom + scoring than ``text`` indexes. To learn more, see the Atlas Search + :atlas:`Scoring ` documentation. diff --git a/source/tutorial/text-search-in-aggregation.txt b/source/tutorial/text-search-in-aggregation.txt index 7b2a78693f4..c7edb2b65a5 100644 --- a/source/tutorial/text-search-in-aggregation.txt +++ b/source/tutorial/text-search-in-aggregation.txt @@ -16,7 +16,7 @@ In the aggregation pipeline, text search is available via the use of the :query:`$text` query operator in the :pipeline:`$match` stage. Restrictions -~~~~~~~~~~~~ +------------ For general :query:`$text` operator restrictions, see :ref:`operator restrictions `. @@ -36,7 +36,7 @@ restrictions: .. |sort-object| replace:: :pipeline:`$sort` pipeline Text Score -~~~~~~~~~~ +---------- .. include:: /includes/fact-text-search-score.rst @@ -132,3 +132,8 @@ matching documents in the :pipeline:`$group` stage. { $group: { _id: null, views: { $sum: "$views" } } } ] ) + +``$search`` Stage in Atlas Search +--------------------------------- + +.. include:: /includes/fact-atlas-search-search-stage.rst