Skip to content

Commit fa9bef7

Browse files
committed
NGSTACK-843: reformat docs and update readme
1 parent 27afe78 commit fa9bef7

File tree

4 files changed

+30
-18
lines changed

4 files changed

+30
-18
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ This only lists all implemented features, see the
1313
[documentation](https://docs.netgen.io/projects/search-extra)
1414
for more details on specific ones.
1515

16+
- [Extensible DocumentFactory](https://docs.netgen.io/projects/search-extra/en/latest/reference/document_factory.html) (`elastic`)
17+
1618
- Support for [asynchronous indexing](https://docs.netgen.io/projects/search-extra/en/latest/reference/asynchronous_indexing.html) (`solr`, `legacy`)
1719

1820
- [`ContentName`](https://github.com/netgen/ibexa-search-extra/blob/master/lib/API/Values/Content/Query/Criterion/ContentName.php) criterion that works on matched translation's Content name (`solr`, `legacy`)
@@ -23,7 +25,7 @@ for more details on specific ones.
2325

2426
Supported operators are: `EQ`, `IN`, `GT`, `GTE`, `LT`, `LTE`, `BETWEEN`.
2527

26-
- [`Visible`](https://github.com/netgen/ibexa-search-extra/blob/master/lib/API/Values/Content/Query/Criterion/Visible.php) criterion (`solr`, `legacy`),
28+
- [`Visible`](https://github.com/netgen/ibexa-search-extra/blob/master/lib/API/Values/Content/Query/Criterion/Visible.php) criterion (`solr`, `elastic`, `legacy`),
2729
usable in both Content and Location search. The criterion works on compound visibility of Content and Location objects:
2830
the Content is visible if it's marked as visible; the Location is visible if it's marked as visible, is not hidden by
2931
one of its ancestor Locations, and it's Content is visible.
Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
DocumentFactory
2-
===============
1+
Extensible DocumentFactory
2+
==========================
3+
34
DocumentFactory is an implementation of field mappers for Elasticsearch modeled after the Solr implementation using the
45
template method pattern. It implements the Elasticsearch ``DocumentFactoryInterface`` and its methods ``fromContent()``
56
and ``fromLocation()`` add fields to document. These methods index the fields from the suitable field mappers.
@@ -10,23 +11,32 @@ Compiler Pass since elasticsearch is not available directly from the bundle.
1011
To use this feature, ensure you have elasticsearch bundle added to your project.
1112

1213
The ``DocumentFactory`` service uses all base field mapper services to index content into the correct document
13-
(content, location, or translation-dependent document)::
14+
(content, location, or translation-dependent document):
15+
16+
* ``ContentFieldMapper``
17+
18+
* ``LocationFieldMapper``
19+
20+
* ``ContentTranslationFieldMapper``
21+
22+
* ``LocationTranslationFieldMapper``
1423

15-
ContentFieldMapper
16-
LocationFieldMapper
17-
ContentTranslationFieldMapper
18-
LocationTranslationFieldMapper
19-
BlockFieldMapper
20-
BlockTranslationFieldMapper
24+
* ``BlockFieldMapper``
25+
26+
* ``BlockTranslationFieldMapper``
2127

2228
These services are abstract classes containing methods ``accept()`` and ``mapFields()`` which are implemented by new
2329
field mappers as needed.
2430

2531
To add a new field mapper, create a class that extends one of the base field mappers above, implements its methods, and
26-
registers the service with one of the following tags, depending on the base field mapper::
32+
registers the service with one of the following tags, depending on the base field mapper:
33+
34+
* ``netgen.ibexa_search_extra.elasticsearch.field_mapper.content``
35+
36+
* ``netgen.ibexa_search_extra.elasticsearch.field_mapper.location``
37+
38+
* ``netgen.ibexa_search_extra.elasticsearch.field_mapper.content_translation``
39+
40+
* ``netgen.ibexa_search_extra.elasticsearch.field_mapper.location_translation``
2741

28-
netgen.ibexa_search_extra.elasticsearch.field_mapper.content
29-
netgen.ibexa_search_extra.elasticsearch.field_mapper.location
30-
netgen.ibexa_search_extra.elasticsearch.field_mapper.content_translation
31-
netgen.ibexa_search_extra.elasticsearch.field_mapper.location_translation
32-
netgen.ibexa_search_extra.elasticsearch.field_mapper.block_translation
42+
* ``netgen.ibexa_search_extra.elasticsearch.field_mapper.block_translation``

docs/reference/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Reference
1010
spellcheck_suggestions
1111
extra_fields
1212
asynchronous_indexing
13-
document_mapper
13+
document_factory
1414

1515
.. include:: /reference/map.rst.inc

docs/reference/map.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* :doc:`/reference/subdocuments`
55
* :doc:`/reference/spellcheck_suggestions`
66
* :doc:`/reference/extra_fields`
7-
* :doc:`/reference/document_mapper`
7+
* :doc:`/reference/document_factory`

0 commit comments

Comments
 (0)