mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 13:36:12 +01:00
TASK: Add documentation and config for new feature
This commit is contained in:
parent
b6ab05bac7
commit
d36d8e8594
4 changed files with 52 additions and 15 deletions
|
@ -9,15 +9,9 @@ plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
indexing {
|
indexing {
|
||||||
# Pages are not supported yet, see
|
pages {
|
||||||
# https://github.com/DanielSiepmann/search_core/issues/24 but
|
additionalWhereClause = pages.doktype NOT IN (3, 199, 6, 254, 255, 199)
|
||||||
# should also be added, together with additionalWhereClause
|
abstractFields = abstract, description, bodytext
|
||||||
# based on doktypes
|
|
||||||
tt_content {
|
|
||||||
additionalWhereClause (
|
|
||||||
pages.doktype NOT IN (3, 199)
|
|
||||||
AND tt_content.CType NOT IN ('gridelements_pi1', 'list', 'div', 'menu', 'shortcut', 'search', 'login')
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,10 @@ plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
indexing {
|
indexing {
|
||||||
tt_content {
|
pages {
|
||||||
indexer = Codappix\SearchCore\Domain\Index\TcaIndexer
|
indexer = Codappix\SearchCore\Domain\Index\TcaIndexer\PagesIndexer
|
||||||
additionalWhereClause = {$plugin.tx_searchcore.settings.indexing.tt_content.additionalWhereClause}
|
additionalWhereClause = {$plugin.tx_searchcore.settings.indexing.pages.additionalWhereClause}
|
||||||
|
abstractFields = {$plugin.tx_searchcore.settings.indexing.pages.abstractFields}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,7 @@ The following settings are available. For each setting its documented which inde
|
||||||
``rootLineBlacklist``
|
``rootLineBlacklist``
|
||||||
"""""""""""""""""""""
|
"""""""""""""""""""""
|
||||||
|
|
||||||
Used by: :ref:`TcaIndexer`.
|
Used by: :ref:`TcaIndexer`, :ref:`PagesIndexer`.
|
||||||
|
|
||||||
Defines a blacklist of page uids. Records below any of these pages, or subpages, are not
|
Defines a blacklist of page uids. Records below any of these pages, or subpages, are not
|
||||||
indexed. This allows you to define areas that should not be indexed.
|
indexed. This allows you to define areas that should not be indexed.
|
||||||
|
@ -147,7 +147,7 @@ options are available:
|
||||||
``additionalWhereClause``
|
``additionalWhereClause``
|
||||||
"""""""""""""""""""""""""
|
"""""""""""""""""""""""""
|
||||||
|
|
||||||
Used by: :ref:`TcaIndexer`.
|
Used by: :ref:`TcaIndexer`, :ref:`PagesIndexer`.
|
||||||
|
|
||||||
Add additional SQL to where clauses to determine indexable records from the table. This way you
|
Add additional SQL to where clauses to determine indexable records from the table. This way you
|
||||||
can exclude specific records like ``tt_content`` records with specific ``CType`` values or
|
can exclude specific records like ``tt_content`` records with specific ``CType`` values or
|
||||||
|
@ -162,6 +162,26 @@ options are available:
|
||||||
Make sure to prefix all fields with the corresponding table name. The selection from
|
Make sure to prefix all fields with the corresponding table name. The selection from
|
||||||
database will contain joins and can lead to SQL errors if a field exists in multiple tables.
|
database will contain joins and can lead to SQL errors if a field exists in multiple tables.
|
||||||
|
|
||||||
|
.. _abstractFields:
|
||||||
|
|
||||||
|
``abstractFields``
|
||||||
|
"""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Used by: :ref:`PagesIndexer`.
|
||||||
|
|
||||||
|
Define which field should be used to provide the auto generated field "search_abstract".
|
||||||
|
The fields have to exist in the record to be indexed. Therefore fields like ``content`` are also
|
||||||
|
possible.
|
||||||
|
|
||||||
|
Example::
|
||||||
|
|
||||||
|
# As last fallback we use the content of the page
|
||||||
|
plugin.tx_searchcore.settings.indexing.<identifier>.abstractFields := addToList(content)
|
||||||
|
|
||||||
|
Default::
|
||||||
|
|
||||||
|
abstract, description, bodytext
|
||||||
|
|
||||||
.. _mapping:
|
.. _mapping:
|
||||||
|
|
||||||
``mapping``
|
``mapping``
|
||||||
|
|
|
@ -27,7 +27,29 @@ The indexer is configurable through the following options:
|
||||||
|
|
||||||
* :ref:`additionalWhereClause`
|
* :ref:`additionalWhereClause`
|
||||||
|
|
||||||
|
.. _PagesIndexer:
|
||||||
|
|
||||||
|
PagesIndexer
|
||||||
|
------------
|
||||||
|
|
||||||
|
Provides zero configuration TYPO3 integration by using the :ref:`t3tcaref:start`. You just can
|
||||||
|
start indexing TYPO3.
|
||||||
|
|
||||||
|
The indexer will use the TCA to fetch all necessary information like relations. Currently the
|
||||||
|
implementation is very basic. In future it will also provide mapping for :ref:`Elasticsearch` and
|
||||||
|
further stuff. Also all static content from each page will be concatenated into a single field to
|
||||||
|
improve search.
|
||||||
|
|
||||||
|
The indexer is configurable through the following options:
|
||||||
|
|
||||||
|
* :ref:`allowedTables`
|
||||||
|
|
||||||
|
* :ref:`rootLineBlacklist`
|
||||||
|
|
||||||
|
* :ref:`additionalWhereClause`
|
||||||
|
|
||||||
|
* :ref:`abstractFields`
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Not all relations are resolved yet, see :issue:`17` and :pr:`20`.
|
Not all relations are resolved yet, see :issue:`17` and :pr:`20`.
|
||||||
Also the `pages`-Table is not available yet, see :issue:`24`.
|
|
||||||
|
|
Loading…
Reference in a new issue