From e3264c0e03ceb0c9f50b1a7a3a95924b62b971af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katarina=20Mio=C4=8Di=C4=87?= Date: Tue, 10 Sep 2024 11:45:39 +0200 Subject: [PATCH] NGSTACK-836 documentation fix --- docs/reference/descendant_indexing.rst | 16 +++++++++++++--- docs/reference/index.rst | 2 ++ docs/reference/map.rst.inc | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/reference/descendant_indexing.rst b/docs/reference/descendant_indexing.rst index a8295628..517cbf41 100644 --- a/docs/reference/descendant_indexing.rst +++ b/docs/reference/descendant_indexing.rst @@ -5,11 +5,13 @@ This feature helps in indexing hierarchical content structures. It allows the ch within the same document as the parent if both are configured for descendant indexing. This means that when you search for a child content, the parent content will also appear in the search results. -''Configuration'' +Configuration +-------------- To enable this feature, set up the descendant indexing configuration: .. code-block:: yaml + hierarchical_indexing: descendant_indexing: enabled: false @@ -36,6 +38,7 @@ Depending on what we want to index, we use different handlers. They represent th If you want to index content to the full text fields, you should use the 'ng_descendant_indexing_fulltext' handler: .. code-block:: yaml + hierarchical_indexing: descendant_indexing: enabled: true @@ -47,16 +50,23 @@ If you want to index content to the full text fields, you should use the 'ng_des content_type_identifier: indexed: true + + To index something other than full text fields (e.g., location information or content metadata), implement new field mappers by extending the corresponding ``BaseFieldMapper`` and registering the field mapper as a service with needed tag. The ``getIdentifier()`` method returns a string of handler identifier which should match the handler identifier defined in the configuration. .. code-block:: php + public function getIdentifier(): string { return 'ng_descendant_indexing_fulltext'; } -The BaseFieldMapper is implemented only for Solr indexing engine and the field mappers are plugged into the existing -solr indexing system. + +.. note:: + + The BaseFieldMapper is implemented only for Solr indexing engine and the field mappers are plugged into the existing + solr indexing system. + diff --git a/docs/reference/index.rst b/docs/reference/index.rst index 996318ee..514c1e94 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -9,5 +9,7 @@ Reference subdocuments spellcheck_suggestions extra_fields + asynchronous_indexing + descendant_indexing .. include:: /reference/map.rst.inc diff --git a/docs/reference/map.rst.inc b/docs/reference/map.rst.inc index 626ee8e9..178c9395 100644 --- a/docs/reference/map.rst.inc +++ b/docs/reference/map.rst.inc @@ -4,3 +4,4 @@ * :doc:`/reference/subdocuments` * :doc:`/reference/spellcheck_suggestions` * :doc:`/reference/extra_fields` +* :doc:`/reference/descendant_indexing`