TASK: Update documentation for data processing

This commit is contained in:
Daniel Siepmann 2018-03-06 10:47:14 +01:00
parent 0210110ccf
commit 176c466d7e
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
5 changed files with 81 additions and 34 deletions

View file

@ -36,5 +36,7 @@ DataProcessing
Before data is transfered to search service, it can be processed by "DataProcessors" like already Before data is transfered to search service, it can be processed by "DataProcessors" like already
known by :ref:`t3tsref:cobj-fluidtemplate-properties-dataprocessing` of :ref:`t3tsref:cobj-fluidtemplate`. known by :ref:`t3tsref:cobj-fluidtemplate-properties-dataprocessing` of :ref:`t3tsref:cobj-fluidtemplate`.
The same is true for retrieved search results. They can be processed again by "DataProcessors" to
prepare data for display in Templates or further usage.
Configuration is done through TypoScript, see :ref:`dataProcessing`. Configuration is done through TypoScript, see :ref:`dataProcessing`.

View file

@ -0,0 +1,32 @@
The following Processor are available:
.. toctree::
:maxdepth: 1
:glob:
/configuration/dataProcessing/CopyToProcessor
/configuration/dataProcessing/RemoveProcessor
/configuration/dataProcessing/GeoPointProcessor
The following Processor are planned:
``Codappix\SearchCore\DataProcessing\ReplaceProcessor``
Will execute a search and replace on configured fields.
``Codappix\SearchCore\DataProcessing\RootLevelProcessor``
Will attach the root level to the record.
``Codappix\SearchCore\DataProcessing\ChannelProcessor``
Will add a configurable channel to the record, e.g. if you have different areas in your
website like "products" and "infos".
``Codappix\SearchCore\DataProcessing\RelationResolverProcessor``
Resolves all relations using the TCA.
Of course you are able to provide further processors. Just implement
``Codappix\SearchCore\DataProcessing\ProcessorInterface`` and use the FQCN (=Fully qualified
class name) as done in the examples above.
By implementing also the same interface as necessary for TYPO3
:ref:`t3tsref:cobj-fluidtemplate-properties-dataprocessing`, you are able to reuse the same code
also for Fluid to prepare the same record fetched from DB for your fluid.

View file

@ -146,7 +146,7 @@ Example::
dataProcessing dataProcessing
-------------- --------------
Used by: All connections while indexing. Used by: All connections while indexing, due to implementation inside ``AbstractIndexer``.
Configure modifications on each document before sending it to the configured connection. Same as Configure modifications on each document before sending it to the configured connection. Same as
provided by TYPO3 for :ref:`t3tsref:cobj-fluidtemplate` through provided by TYPO3 for :ref:`t3tsref:cobj-fluidtemplate` through
@ -170,38 +170,7 @@ Example::
The above example will copy all existing fields to the field ``search_spellcheck``. Afterwards The above example will copy all existing fields to the field ``search_spellcheck``. Afterwards
all fields, including ``search_spellcheck`` will be copied to ``search_all``. all fields, including ``search_spellcheck`` will be copied to ``search_all``.
E.g. used to index all information into a field for :ref:`spellchecking` or searching with
different :ref:`mapping`.
The following Processor are available: .. include:: /configuration/dataProcessing/availableAndPlanned.rst
.. toctree:: Also data processors are available for search results too, see :ref:`searching_dataProcessing`.
:maxdepth: 1
:glob:
dataProcessing/CopyToProcessor
dataProcessing/RemoveProcessor
dataProcessing/GeoPointProcessor
The following Processor are planned:
``Codappix\SearchCore\DataProcessing\ReplaceProcessor``
Will execute a search and replace on configured fields.
``Codappix\SearchCore\DataProcessing\RootLevelProcessor``
Will attach the root level to the record.
``Codappix\SearchCore\DataProcessing\ChannelProcessor``
Will add a configurable channel to the record, e.g. if you have different areas in your
website like "products" and "infos".
``Codappix\SearchCore\DataProcessing\RelationResolverProcessor``
Resolves all relations using the TCA.
Of course you are able to provide further processors. Just implement
``Codappix\SearchCore\DataProcessing\ProcessorInterface`` and use the FQCN (=Fully qualified
class name) as done in the examples above.
By implementing also the same interface as necessary for TYPO3
:ref:`t3tsref:cobj-fluidtemplate-properties-dataprocessing`, you are able to reuse the same code
also for Fluid to prepare the same record fetched from DB for your fluid.

View file

@ -216,3 +216,37 @@ Example::
} }
Only ``filter`` is allowed as value. Will submit an empty query to switch to filter mode. Only ``filter`` is allowed as value. Will submit an empty query to switch to filter mode.
.. _searching_dataProcessing:
dataProcessing
--------------
Used by: All connections while indexing, due to implementation inside ``SearchService``.
Configure modifications on each document before returning search result. Same as provided by TYPO3
for :ref:`t3tsref:cobj-fluidtemplate` through
:ref:`t3tsref:cobj-fluidtemplate-properties-dataprocessing`.
All processors are applied in configured order. Allowing to work with already processed data.
Example::
plugin.tx_searchcore.settings.searching.dataProcessing {
1 = Codappix\SearchCore\DataProcessing\CopyToProcessor
1 {
to = search_spellcheck
}
2 = Codappix\SearchCore\DataProcessing\CopyToProcessor
2 {
to = search_all
}
}
The above example will copy all existing fields to the field ``search_spellcheck``. Afterwards
all fields, including ``search_spellcheck`` will be copied to ``search_all``.
.. include:: /configuration/dataProcessing/availableAndPlanned.rst
Also data processors are available while indexing too, see :ref:`dataProcessing`.

View file

@ -29,6 +29,16 @@ Also multiple filter are supported. Filtering results by fields for string conte
Facets / aggregates are also possible. Therefore a mapping has to be defined in TypoScript for Facets / aggregates are also possible. Therefore a mapping has to be defined in TypoScript for
indexing, and the facets itself while searching. indexing, and the facets itself while searching.
.. _features_dataProcessing:
DataProcessing
==============
DataProcessing, as known from ``FLUIDTEMPLATE`` is available while indexing and for search results.
Each item can be processed by multiple processor to prepare data for indexing and output.
See :ref:`concepts_indexing_dataprocessing` in :ref:`concepts` section.
.. _features_planned: .. _features_planned:
Planned Planned