Skip to content

Commit

Permalink
NGSTACK-836 documentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Katarina Miočić committed Sep 10, 2024
1 parent 0d1f267 commit e3264c0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/reference/descendant_indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.

2 changes: 2 additions & 0 deletions docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ Reference
subdocuments
spellcheck_suggestions
extra_fields
asynchronous_indexing
descendant_indexing

.. include:: /reference/map.rst.inc
1 change: 1 addition & 0 deletions docs/reference/map.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
* :doc:`/reference/subdocuments`
* :doc:`/reference/spellcheck_suggestions`
* :doc:`/reference/extra_fields`
* :doc:`/reference/descendant_indexing`

0 comments on commit e3264c0

Please sign in to comment.